1.

A pointer _________________(a) Can point to only one object at a time(b) Can point to more than one objects at a time(c) Can point to only 2 objects at a time(d) Can point to whole class objects at a timeI have been asked this question in exam.This intriguing question comes from Pointer to Objects in chapter Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming

Answer»

The CORRECT answer is (a) Can point to only one object at a TIME

Easiest EXPLANATION - The object pointer can point to only one object at a time. The pointer will be able to store only one ADDRESS at a time. Hence only one object can be referred.



Discussion

No Comment Found

Related InterviewSolutions