• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE | CSE 2023 | Question 37

Consider the following program

int main()     int f1(){                int f2(int X){                   int f3(){
{                 return (1);            f3();                             return (5);
f1();           }                       if(X==1)                          }
f2(2);                                     return f1();
f3();                                   else
return(0);                                 return (X+f2(X-1));
}                                        }

Which of the following options represents the activation tree corresponding to the main function?

(A)

a

(B)

b

(C)

c

(D)

d

Answer

Please comment below if you find anything wrong in the above post
Feeling lost in the world of random DSA topics, wasting time without progress? It's time for a change! Join our DSA course, where we'll guide you on an exciting journey to master DSA efficiently and on schedule.
Ready to dive in? Explore our Free Demo Content and join our DSA course, trusted by over 100,000 geeks!

Last Updated :
Share your thoughts in the comments