
what's the difference between heap and stack ?

Hi Friend,
Differences:
1)Stack is referred as temporary memory while Heap is referred as permanent memory.
2)In stack, automatic variables and function parameters are allocated while in Heap, dynamic objects are allocated.
Thanks