what is difference between heep and stack memory give simple consept.

Recommended Answers

All 5 Replies

Try using our friend Google... Or go to Wikipedia - they have good articles on these subjects.

Also try reading your textbook.

With reference to ur query,
heap is also called as dynamic memory. When we are creating the memory using malloc(),calloc(),realloc() functions it will create the memory in heap area. It acts as a permanent memory if we are not deallocated the memory using free() funcion.

stack the no. of arguments we are passing in printf() statement that evaluation will takes place in stack area i.e., LIFO procedure.

This post may prove helpful. It covers heap memory in detail, while giving an overview of local memory with links to how it is implemented on the stack.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.