1.

What is the size of an object pointer?(a) Equal to size of any usual pointer(b) Equal to size of sum of all the members of object(c) Equal to size of maximum sized member of object(d) Equal to size of voidI had been asked this question during an online interview.My enquiry is from Pointer to Objects in portion Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming

Answer»

The CORRECT option is (a) Equal to SIZE of any USUAL pointer

To explain: The size of OBJECT pointer is same as that of any usual pointer. This is because only the address have to be stored. There are no values to be stored in the pointer.



Discussion

No Comment Found

Related InterviewSolutions