1.

Does delete return any value?(a) Yes, positive value(b) Yes, negative value(c) Yes, zero value(d) NoI have been asked this question during an online interview.My query is from Delete Operator topic in section Memory Allocation & Scope of Variable of Object Oriented Programming

Answer»

Correct answer is (d) No

Explanation: The delete OPERATOR doesn’t RETURN any value. Its FUNCTION is to delete the memory allocated for an object. This is done in reverse way as that new operator WORKS.



Discussion

No Comment Found

Related InterviewSolutions