Why are heaps used for memory allocation?

Heaps are used in programming languages for memory allocation. The values assigned in a heap are stored permanently and has to be deleted manually by the user. Values on stack on the other hand will be deleted automatically once the function call ends. The reason for usage of the heap is that they are variable in size.
For More Information Please Refer:
https://www.quora.com/Why-are-heaps-used-for-memory-allocation-Why-arent-stacks-or-any-others-used
You May Also Like to Read: