Consider the following statements:
S1 : Static allocation can not support recursive function.
S2 : Stack allocation can support pointers but can not deallocate storage at run-time.
S3 : Heap allocation can support pointers and it can allocate or deallocate storage at run-time.
Which of the above statements are true?
A.) S1 and S2
B.) S2 and S3
C.) S3 and S1
D.) S1, S2, and S3
ANS is C
int **p = new int*;
In this case you reserve a portion of memory for a pointer to int in the heap, but the pointer that can reference such location is still a stack variable.