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 got this question by my school teacher while I was bunking the class.Origin of the question is Memory Allocation of Object in chapter Object of Object Oriented Programming

Answer»

Right choice is (c) EITHER delete or free

For explanation: 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.



Discussion

No Comment Found

Related InterviewSolutions