Runtime Storage Organization questions

Q17

GATE CS 2026 CS-2Runtime EnvironmentsMCQ1 mark−1/3 if wrong
In C runtime environment, which one of the following is stored in heap?
Show answer without attempting

Answer: C

Q4

GATE CS 2021 CS-1Runtime EnvironmentsMCQ1 mark−1/3 if wrong
Consider the following statements.
S1S_1: The sequence of procedure calls corresponds to a preorder traversal of the activation tree.
S2S_2: The sequence of procedure returns corresponds to a postorder traversal of the activation tree.
Which one of the following options is correct?
Show answer without attempting

Answer: C

Q9

GATE CS 2020 CSRuntime EnvironmentsMCQ1 mark−1/3 if wrong
Consider the following statements.

I. Symbol table is accessed only during lexical analysis and syntax analysis.
II. Compilers for programming languages that support recursion necessarily need heap storage for memory allocation in the run-time environment.
III. Errors violating the condition ‘any variable must be declared before its use’ are detected during syntax analysis.

Which of the above statements is/are TRUE?
Show answer without attempting

Answer: D

Q36

GATE CS 2016 CS-1Runtime EnvironmentsMCQ2 marks−2/3 if wrong
What will be the output of the following pseudo-code when parameters are passed by reference and dynamic scoping is assumed?
a=3;
void n(x) {x = x * a; print(x);}
void m(y) {a = 1; a = y - a; n(a); print(a);}
void main() {m(a);}
Show answer without attempting

Answer: D

Q18

GATE CS 2014 CS-2Runtime EnvironmentsMCQ1 mark−1/3 if wrong
Which one of the following is NOT performed during compilation?
Show answer without attempting

Answer: A

Q18

GATE CS 2014 CS-3Runtime EnvironmentsMCQ1 mark−1/3 if wrong
Which of the following statements are CORRECT?

1) Static allocation of all data areas by a compiler makes it impossible to implement recursion.
2) Automatic garbage collection is essential to implement recursion.
3) Dynamic allocation of activation records is essential to implement recursion.
4) Both heap and stack are essential to implement recursion.
Show answer without attempting

Answer: D

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/70 correct0 marks