Consider the following program:
Which one of the following options represents the activation tree corresponding to the main function?
c
- A

- B

- C

- D

Programming in CFunctions, Parameter Passing, Scope Rules, RecursionMCQ2 marks · −2/3 if wrongMedium
1int main( )
2{
3 f1( );
4 f1(2);
5 f3( );
6 return (0);
7}
8int f1( )
9{
10 return(1);
11}
12int f2(int X)
13{
14 f3( );
15 if (X == 1)
16 return f1( );
17 else
18 return (X * f2(X - 1));
19}
20int f3( )
21{
22 return(5);
23}
24



A GATE question every morning
One real past-paper question every morning for your branch, answer hidden until you tap. Free on Telegram.