Home » Blog » What are stack and heap areas?

What are stack and heap areas?

  1. Heap Area:It is used for the objects allocated dynamically (Using malloc() and calloc()).
  2. Stack Area:It is used to store local variables and arguments of a method. This stays in memory only till the termination of that particular method.

Leave a Reply

Your email address will not be published.