What are the differences between Heap and Stack Memory?

in progress 0
Studies Neha Sharma 12 months 1 Answer 74 views Silver 0

Answer ( 1 )

  1. Stack and Heap are the memory segments used in memory allocation techniques. The primary difference between Stack and heap is that stack involves linear and sequential allocation of the memory whereas heap acts as a pool of storage area which includes random allocation of the memory. Speed is the major parameter which distinguishes stack and heap; a stack is significantly faster than a heap. Stack costs more than Heap.

Leave an answer


Captcha Click on image to update the captcha .

About Neha SharmaSilver