Interviews1 answer
what is the advantage of allocation on Heap
1) what is the advantage of allocation on Heap ? 2) what is auto_ptr in C++ ? 3) what is constructor initialization list ?
1 Answer
Basically, the heap is more flexible than the stack. That’s because memory space for the heap can be dynamically allocated and de-allocated as needed. However, memory of the heap can at times be slower when compared to that stack.
Anirudha ketkar [SSM]Posted Jul 21, 2020, 12:31 AM EDT
