InterviewSolution
Saved Bookmarks
| 1. |
Which among the following keyword can be used to free the allocated memory for an object?(a) delete(b) free(c) either delete or free(d) only deleteI have been asked this question during an interview.This key question is from Overloading Member Functions topic in portion Member Functions & its Types of Object Oriented Programming |
|
Answer» CORRECT answer is (c) either delete or free The EXPLANATION is: The memory allocated for an object is usually automatically made free. But if EXPLICITLY memory has to be made free then we can use either free or delete keywords depending on PROGRAMMING languages. |
|