1.

Whenever non-static member functions are called _______________(a) Address of the object is passed implicitly as an argument(b) Address of the object is passed explicitly as an argument(c) Address is specified globally so that the address is not used again(d) Address is specified as return type of the functionI had been asked this question in quiz.The query is from This Pointer topic in portion Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming

Answer»

The CORRECT choice is (a) Address of the OBJECT is passed implicitly as an argument

The EXPLANATION is: The address is passed implicitly as an argument to the function. This doesn’t have to be passed explicitly. The address is passed, of the object which is CALLING the non-static member function.



Discussion

No Comment Found

Related InterviewSolutions