What is operator overloading? Give Example

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is polymorphism in oops with example?

524


What is coupling in oop?

585


What is polymorphism and types?

592


What is the difference between a constructor and a destructor?

601


What is polymorphism and example?

583






Can enum be null?

581


What are the two different types of polymorphism?

664


How can you overcome the diamond problem in inheritance?

761


What is overloading and its types?

606


When not to use object oriented programming?

563


What is the significance of classes in oop?

585


What is overloading in oops?

589


Following are the class specifications: class {int a}; class {int b}; Using friend funtion,calculate the max of two objects and display it.

1998


What is this pointer in oop?

544


What is inheritance write a program to show use of inheritance?

605