Gate CS-2012 Question Paper With Solutions

Q. 36 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 A21
  
    Call A1;
  End main.

Consider the calling chain : Main->A1->A2->A21->A1
The correct set of activation records along with their access links is given by :

Gate CS-2012 Question Paper With Solutions Gate CS-2012 Question Paper With Solutions

Answer: (D)

Explanation:

Gate CS-2012 Question Paper With Solutions

Gate CS-2012 Question Paper With Solutions

Learn More:   Gate CS-2017-1 Question Paper With Solutions

LEAVE A REPLY

Please enter your comment!
Please enter your name here