I have been going through this chapter on Pointers and came across this sentence:
You will use pointers to deal with variables that have been allocated on the heap. (You can use pointers to deal with stack variables, but in most cases this just isn't necessary).
I know how pointers can be used to deal with variables that have been allocated on heap. But I cannot image how it can be used to deal with stack variables. Since stack variables are automatically deallocated when the function exits (i.e variables are pushed out of the stack), how can the same be done with pointers (as the above quoted text implies) without using something like free
system call ? Is that possible ?