1.

The size of both stack and heap remains the same during run time.(a) True(b) FalseThis question was addressed to me by my college director while I was bunking the class.The doubt is from Static vs Dynamic Memory Allocation in portion Dynamic Memory Allocation in C of C

Answer»

The correct option is (B) False

The best explanation: Memory can be allocated or de-allocated during the run time in the HEAP region. Memory BINDINGS (allocation and de-allocation) are established and destroyed during the EXECUTION of the program. Hence we can see that the size of heap does not remain same during run time. However, the size of stack remains the same.



Discussion

No Comment Found

Related InterviewSolutions