Do u know , Differences between stack and heap , Let u share ur thought here . | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Do u know , Differences between stack and heap , Let u share ur thought here .

The stack is where temporary stuff, like function arguments and local variables, goes. It's size is limited. The heap is ordinary global memory assigned to your program for dynamic use. Unlike the stack, the heap does not have size restrictions on variable size (apart from the obvious physical limitations of your computer). The one has to use pointers to access memory on the heap. In C++, when you use the new operator to allocate memory, this memory is allocated in the application’s heap segment.

25th Sep 2017, 2:08 PM
Lvraj Sandhi
Lvraj Sandhi - avatar
4 Answers
+ 7
here is my thought: this question was asked 30 mins ago https://www.sololearn.com/Discuss/740552/can-somebody-please-explain-me-what-exactly-is-the-stack-and-the-heap-on-c please check at least one page of discussion before posting
25th Sep 2017, 2:17 PM
boskojevtic
boskojevtic - avatar
+ 5
ok. sorry to bother you
25th Sep 2017, 2:52 PM
boskojevtic
boskojevtic - avatar
0
thanks bos
25th Sep 2017, 2:27 PM
Lvraj Sandhi
Lvraj Sandhi - avatar
0
No boskojevtic there is no question like this that I have posted
25th Sep 2017, 2:31 PM
Lvraj Sandhi
Lvraj Sandhi - avatar