MCQ1 mark
In C runtime environment, which one of the following is stored in heap?
Single correct
GATE CSE previous year questions · Compiler Design
Single correct
int main() int f1() int f2(int X) int f3()
{ { { {
f1(); return(1); f3(); return(5);
f2(2); } if (X==1) }
f3(); return f1();
return(0); else
} return (X*f2(X-1));
}
Which one of the following options represents the activation tree corresponding to the main function?
The four trees (A) to (D) are shown in the figure.
Single correct
Answer key coming soon
Single correct
Answer key coming soon
Single correct
Answer key coming soon
a=3;
void n(x) {x = x * a; print(x);}
void m(y) {a = 1; a = y - a; n(a); print(a);}
void main() {m(a);}Single correct
Answer key coming soon
Single correct
Single correct
Program main;
Var ...
Procedure A1;
Var ...
Call A2;
End A1
Procedure A2;
Var ...
Procedure A21;
Var ...
Call A1;
End A21
Call A21;
End A2
Call A1;
End main.
Consider the calling chain: Main → A1 → A2 → A21 → A1
The correct set of activation records along with their access links is given by
Single correct
Answer key coming soon