1.

Which operator can be used to free the memory allocated for an object in C++?(a) Free()(b) delete(c) Unallocate(d) CollectThe question was asked in a national level competition.Asked question is from Memory Allocation of Object in portion Object of Object Oriented Programming

Answer»

Correct ANSWER is (b) delete

The best explanation: The delete operator in C++ can be used to FREE the memory and resources held by an object. The function can be called EXPLICITLY whenever REQUIRED. In C++ memory management must be done by the programmer. There is no automatic memory management in C++.



Discussion

No Comment Found

Related InterviewSolutions