What is operator overloading? Give Example
Answers were Sorted based on User's Feedback
Answer / palsaniya sadikhasan, meta.
Operator overloading is an operator that perform different
task based on given arguments.
e.g. suppose '+' is an operator is used to add two number
and if we use '+' with two strings then operator '+' can
concate two string is known as operator overloading.
or
operator overloading means one operator can perform multiple
operation based on given arguments.
Is This Answer Correct ? | 39 Yes | 2 No |
Answer / riya piyush jain
Operator overloading (less commonly known as operator ad-
hoc polymorphism) is a specific case of polymorphism in
which some or all of operators like +, =, or == have
different implementations depending on the types of their
arguments. Sometimes the overloadings are defined by the
language; sometimes the programmer can implement support
for new types.
Is This Answer Correct ? | 23 Yes | 1 No |
Answer / sagar kelkar
it may be defined as an operator performing different
operations.for ex-arithmetic operators such
as(+,-,*,/,++,--) etc..
Is This Answer Correct ? | 22 Yes | 8 No |
Answer / msn
Making an operator doing different operation other than
the normal one is termed as operator overloading..
Say for example Operator + is normally used to add numbers
but we can add another function concatenate two strings
Is This Answer Correct ? | 9 Yes | 0 No |
Answer / selva
operator performing different task based on argument supplied.
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / karthik
A single operator is used to perform diff fuction in a
program is known as operator overloading..
Is This Answer Correct ? | 4 Yes | 2 No |
Answer / xxxx
A single operator is used to perform diff fuction in a
program is known as operator overloading..
Operator overloading is an operator that perform different
task based on given arguments.
e.g. suppose '+' is an operator is used to add two number
and if we use '+' with two strings then operator '+' can
concate two string is known as operator overloading.
or
operator overloading means one operator can perform multiple
operation based on given arguments.
Is This Answer Correct ? | 3 Yes | 1 No |
Answer / mohd nadeem
operator overloading provides special meaning to predefined operators with respect to user defined data types like class, struct, enum.
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / karthika
usually operators dealing with basic data types,operator
overloading allows the users to give additional meaning to
most operators so that it can be used with user's own data
types.
Is This Answer Correct ? | 0 Yes | 0 No |
namespace is working on which compiler?
what is pointers
How do you define a class in oop?
The IT giant Tirnop has recently crossed a head count of 150000 and earnings of $7 billion. As one of the forerunners in the technology front, Tirnop continues to lead the way in products and services in India. At Tirnop, all programmers are equal in every respect. They receive identical salaries and also write code at the same rate. Suppose 14 such programmers take 14 minutes to write 14 lines of code in total. How long will in take 5 programmers to write 5 lines of code in total ?
What is data binding in oops?
what are the realtime excercises in C++?
I am DeePu sotware engineer working with EMC corporation ,recently I had attended mcafee interview . Their questions were at heights of stupidity , I don't know what they want , I am a developer with 4 year experienced .I am listing the questions asked 1:What is the flag in g++ to avoid structure padding 2:In wht order parameters are passed to stack 3:How you will edit code segment of an exe
what is oops
Can destructor be overloaded?
What are the components of marker interface?
What is extreme programming?
What is difference between data abstraction and encapsulation?