1.

The memory allocated for an object ____________________(a) Can be only dynamic(b) Can be only static(c) Can be static or dynamic(d) Can’t be done using dynamic functionsI got this question by my college director while I was bunking the class.This intriguing question comes from Memory Allocation of Object in section Object of Object Oriented Programming

Answer»

Correct CHOICE is (C) Can be static or dynamic

The explanation: The memory allocation for an object can be static or dynamic. The static memory allocation is when an object is DECLARED directly without USING any function usually. And dynamic allocation is when we use some dynamic allocation function to allocate memory for data MEMBER of an object.



Discussion

No Comment Found

Related InterviewSolutions