1.

When the operator to be overloaded becomes the left operand member then ______________(a) The right operand acts as implicit object represented by *this(b) The left operand acts as implicit object represented by *this(c) Either right or left operand acts as implicit object represented by *this(d) *this pointer is not applicable in that member functionI have been asked this question in unit test.I'm obligated to ask this question of Member Operator Function in section Member Functions & its Types of Object Oriented Programming

Answer»

Correct CHOICE is (B) The left operand acts as IMPLICIT object represented by *this

The best I can EXPLAIN: The left operand becomes the object that is referred by *this pointer in the member function that will be called while using operator overloading. This is done to point to a specific object on which the overloading will be applied.



Discussion

No Comment Found

Related InterviewSolutions