GATEverse Practice, past papers & mock tests
GATE 2023 · CS - Forenoon
Compiler DesignCode Generation and OptimizationmediumMCQ2 marks
Consider the following program:
c
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? The alternatives A–D are shown in the image.
Save your progress

Related Compiler Design PYQs