What is operator overloading? Give Example
Answer Posted / 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 |
Post New Answer View All Answers
Why is object oriented programming so hard?
why reinterpret cast is considered dangerous?
What is persistence in oop?
Why do we use oop?
Can we define a class within the interface?
What do you mean by variable?
How long to learn object oriented programming?
Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.
Explain virtual inheritance?
What is a superclass in oop?
What is the diamond problem in inheritance?
What is variable example?
Is this job good for future? can do this job post grduate student?
What is advantage of inheritance?
• What are the desirable attributes for memory managment?