1.

Local variables are stored in an area called ___________(a) Heap(b) Permanent storage area(c) Free memory(d) StackThis question was addressed to me in an interview for internship.The above asked question is from Static vs Dynamic Memory Allocation topic in chapter Dynamic Memory Allocation in C of C

Answer»

The correct answer is (d) Stack

Easy explanation - LOCAL variables are STORED in an area called stack. Global variables, STATIC variables and program instructions are stored in the PERMANENT storage area. The memory space between these two regions is KNOWN a heap.



Discussion

No Comment Found

Related InterviewSolutions