1.

Which among the following is true?(a) The pointer to object can hold address only(b) The pointer can hold value of any type(c) The pointer can hold only void reference(d) The pointer can’t hold any valueThe question was asked in an interview for job.Origin of the question is Pointer to Objects topic in portion Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming

Answer»

The correct option is (a) The pointer to OBJECT can hold ADDRESS only

Explanation: The pointer to an object can hold only the addresses. Address of any other object of same class. This allows the programmer to link more than one OBJECTS if REQUIRED.



Discussion

No Comment Found

Related InterviewSolutions