Skip to content

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

GateBrew
← GATE CSE 2012
Questions

Q36

MCQ2 marks, −0.67Compiler designMedium

Consider the program given below, in a block-structured pseudo-language with lexical scoping and nesting of procedures permitted.

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: \text{Main} \rightarrow \text{A1} \rightarrow \text{A2} \rightarrow \text{A21}\rightarrow \text{A1} The correct set of activation records along with their access links is given by:

Figure 1

Sign in to save attempts.

Solutions and discussion are hidden while you attempt this question. They open once you check or show the answer.