• edited by
1,314 views
2 2 votes
Which of following is correct?

1). Drawback with static allocation is that it does not support recursion.

2). Drawback with stack allocation is that, when function completes its execution it will be popped out from stack..

3). Both are correct

4).None of above

1 Answer

Best answer
4 4 votes
1. is correct and recursion can never be done with static allocation.

2. is a bit ambiguous. But assuming a functional language feature, this is also true. In order to return a function, its activation record must be alive even after function run. So, activation record is created on heap and not on stack for these languages.
• selected by
Position:
Show:

Related questions

0 0 votes
0 0 answers
243
243 views
9 9 votes
1 answers 1 answer
3.2k
3.2k views
papesh asked Dec 17, 2016
3,237 views
$x=5$$x=x-3$$\textbf{if } x<3$$\quad y=x*2$$\quad w=y$$\textbf{else}$$\quad y=x-3$$w=x-y$$z=x+y$Give Equivalent SSA.
1 1 vote
1 answers 1 answer
2.4k
2.4k views
radha gogia asked Apr 30, 2018
2,358 views
1.Class of grammar that will parse using LR method is proper subset of class of grammar that will parse with predictive parser .2. LR Parser can be constructed to recogni...