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 the significance of classes in oop?

585


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

5246


Why polymorphism is used in oops?

576


What does and I oop mean in text?

616


What are the three parts of a simple empty class?

1449






What is abstraction in oops?

578


What is the full form of oops?

605


given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy

2141


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

611


Why do we need polymorphism in c#?

681


What is cohesion in oop?

614


What do you mean by overloading?

575


Can destructor be overloaded?

592


Write a program to implement OOPS concepts such as inheritance, polymorphism, friend function, operator overloading?

4234


What is difference between inheritance and polymorphism?

561