Advertisements
Advertisements
Question
What is operator overloading? Give some examples of operators which can be overloaded.
Short Note
Solution
The term operator overloading refers to giving additional functionality to the normal C++ operators like It is also a type of polymorphism in which an operator is overloaded to give user-defined meaning to it.
For example, the ‘+’ operator can be overloaded to perform addition on various data types, like for Integer, String (concatenation), etc.
shaalaa.com
Is there an error in this question or solution?