Keyur
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
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.