memory allocation in Stack and Heap
I’m not entirely sure what you’re asking, but I’ll try my best to answer. The following declares a variable i on the stack: int i; When I ask for an address using &i I get the actual location on the stack. When I allocate something dynamically using malloc, there are actually TWO pieces of data … Read more