1.

The new operator _____________(a) Can allocate reference types too(b) Doesn’t allocate reference types(c) Can allocate reference to objects(d) Doesn’t allocate any dataI had been asked this question during an interview for a job.My question is from New Operator topic in portion Memory Allocation & Scope of Variable of Object Oriented Programming

Answer»

Right answer is (B) Doesn’t allocate reference TYPES

To explain I would say: The NEW OPERATOR doesn’t allocate reference types. This is because the reference types are not objects. The new operator is USED to allocate memory to the direct objects.



Discussion

No Comment Found

Related InterviewSolutions