1.

Which operator can be used to check the size of an object?(a) sizeof(objectName)(b) size(objectName)(c) sizeofobject(objectName)(d) sizedobject(objectName)The question was asked in an interview.Question is from Overloading Member Functions in division Member Functions & its Types of Object Oriented Programming

Answer»

Correct choice is (a) sizeof(objectName)

To explain: The sizeof OPERATOR is used to get the size of an ALREADY created object. This operator MUST constail keyword sizeof(objectName). The output will give the number of bytes acquired by a single object of some class.



Discussion

No Comment Found

Related InterviewSolutions