1.

Which among the following is false?(a) Object must be created before using members of a class(b) Memory for an object is allocated only after its constructor is called(c) Objects can’t be passed by reference(d) Objects size depends on its class data membersThis question was posed to me in an international level competition.This interesting question is from Objects topic in division OOPs Concept & Features of Object Oriented Programming

Answer»

Right choice is (c) Objects can’t be passed by REFERENCE

To explain I would say: Objects can be passed by reference. Objects can be passed by value ALSO. If the object of a CLASS is not created, we can’t USE members of that class.



Discussion

No Comment Found

Related InterviewSolutions