1.

How many approaches are used for operator overloading?(a) 1(b) 2(c) 3(d) 4This question was posed to me during an interview.I'd like to ask this question from Operator Overloading in chapter Source Files, Classes and Operator Overloading in C++ of C++

Answer»

Correct choice is (c) 3

To explain I WOULD SAY: There are 3 different approaches used for OPERATOR overloading:

i. Overloading unary operator.

ii. Overloading binary operator.

iii. Overloading binary operator using a FRIEND function.



Discussion

No Comment Found

Related InterviewSolutions