1.

If delete is applied to an object whose l-value is modifiable, then _______________ after the object is deleted.(a) Its value is defined as null(b) Its value is defined as void(c) Its value is defined as 0(d) Its value is undefinedThe question was asked by my college director while I was bunking the class.Asked question is from Delete Operator topic in chapter Memory Allocation & Scope of Variable of Object Oriented Programming

Answer»

Correct CHOICE is (d) Its value is undefined

The explanation is: After performing delete operation on an OBJECT whole l-value is MODIFIABLE, its values BECOMES undefined. This is done so as to denote that the memory space is available to be used for other purposes.



Discussion

No Comment Found

Related InterviewSolutions