1.

In case of non-static member functions how many maximum object arguments a unary operator overloaded function can take?(a) 1(b) 2(c) 3(d) 0This question was addressed to me at a job interview.My question is based upon Operator Overloading topic in portion Source Files, Classes and Operator Overloading in C++ of C++

Answer» RIGHT answer is (d) 0

Best explanation: In the case of non-static member functions unary OPERATOR OVERLOADED FUNCTION should not take any OBJECT argument.


Discussion

No Comment Found

Related InterviewSolutions