1.

Which is the pointer which denotes the object calling the member function?(a) Variable pointer(b) This pointer(c) Null pointer(d) Zero pointerThis question was posed to me in class test.My query is from This Pointer in section Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming

Answer»

Right option is (b) This POINTER

The explanation: The pointer which denotes the object CALLING the member function is known as this pointer. The this pointer is USUALLY USED when there are members in the function with same name as those of the class members.



Discussion

No Comment Found

Related InterviewSolutions