Topics in Runtime Environments

Filter by year

Runtime Environments questions

Q36

GATE CS 2012 CSRuntime EnvironmentsMCQ2 marks−2/3 if wrong
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 →\rightarrow A1 →\rightarrow A2 →\rightarrow A21 →\rightarrow A1

The correct set of activation records along with their access links is given by
Show answer without attempting

Answer: D

0/10 correct0 marks

Related topics in Compiler Design