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

How to call a non virtual function in the derived class by using base class pointer

5281


What is polymorphism explain?

695


How is polymorphism achieved?

587


Can we have inheritance without polymorphism?

617


What is encapsulation in ict?

608






Prepare me a program for the animation of train

2005


What is a function in oop?

633


What is destructor example?

602


What is the full form of oops?

616


What are oops functions?

588


Why do we use polymorphism in oops?

585


Why is encapsulation used?

579


What is destructor in oop?

627


hi all..i want to know oops concepts clearly can any1 explain??

1683


What is the purpose of enum?

585