+ 1
What would you do when you don't know the maximum amount of memory your program would be allocating ?
8th Oct 2021, 8:57 AM
Arsenic
Arsenic - avatar
0
Scope is also one consideration, heap based memory lifetime is not limited as is the stack based memory. Memory allocated on the heap stays until explicitly destroyed, with the exception of smart pointers, *probably* ... https://stackoverflow.com/questions/40701228/why-do-we-use-heap-to-store-memory
8th Oct 2021, 9:18 AM
Ipang
0
Not only two memory area stack, heap are available read about assembly you will understood better about memory concepts and working process.
8th Oct 2021, 9:52 AM
💫As💫
💫As💫 - avatar