Skip to content

Beta · Data may be lost.Your data may be reset or lost.

GateBrew
← GATE CSE 2023
Questions

Q26

MCQ2 marks, −0.67Compiler design

Consider the following program:

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

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

Sign in to save attempts.

The solution is hidden while you attempt this question. It opens once you check or show the answer.