Which of the following is correct?
S1: In heap allocation, memory is allocated at compile time whereas in stack allocation, memory is allocated at run time.
S2: Both, stack allocation and static allocation supports recursion.
1
S1 is correct, S2 is not
2
S2 is correct, S1 is not
3
Both are correct
4
Both are wrong