1.

Object can’t be used with pointers because they belong to user defined class, and compiler can’t decide the type of data may be used inside the class.(a) True(b) FalseI had been asked this question by my college professor while I was bunking the class.Enquiry is from Objects topic in portion OOPs Concept & Features of Object Oriented Programming

Answer»

Correct answer is (B) False

For explanation: The explanation given is wrong because OBJECT can always be used with pointers like with any other VARIABLES. Compiler doesn’t have to KNOW the structure of the class to use a pointer because the pointers only POINTS to a memory address/stores that address.



Discussion

No Comment Found

Related InterviewSolutions