Runtime Environment: GATE CS Previous Year Questions

Runtime Environment · Compiler Design

10 questions · asked in 9 of 27 years (2000–2026)

MCQ 101-mark 8 · 2-mark 2

2000Questions per year2026

Questions 6–10 of 10

Q6GATE 20122 marksMCQ−0.67 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
(A) Main A1 A2 A21 A1 FRAME POINTER ACCESS LINKS (B) Main A1 A2 A21 A1 FRAME POINTER ACCESS LINKS (C) Main A1 A2 A21 FRAME POINTER ACCESS LINKS (D) Main A1 A2 A21 A1 FRAME POINTER ACCESS LINKS

Q7GATE 20101 markMCQ−0.33 if wrong
Which languages necessarily need heap allocation in the runtime environment?

Q8GATE 20082 marksMCQ−0.67 if wrong
Which of the following are true?

I. A programming language which does not permit global variables of any kind and has no nesting of procedures/functions, but permits recursion can be implemented with static storage allocation

II. Multi-level access link (or display) arrangement is needed to arrange activation records only if the programming language being implemented has nesting of procedures/functions

III. Recursion in programming languages cannot be implemented with dynamic storage allocation

IV. Nesting procedures/functions and recursion require a dynamic heap allocation scheme and cannot be implemented with a stack-based allocation scheme for activation records

V. Programming languages which permit a function to return a function as its result cannot be implemented with a stack-based storage allocation scheme for activation records

Q9GATE 20071 markMCQ−0.33 if wrong
Early binding refers to a binding performed at compile time and late binding refers to a binding performed at execution time. Consider the following statements:
i. Static scope facilitates w1 bindings.
ii. Dynamic scope requires w2 bindings.
iii. Early bindings w3 execution efficiency.
iv. Late bindings w4 execution efficiency.
The right choices of wl, w2, w3 and w4 (in that order) are

Q10GATE 20021 markMCQ−0.33 if wrong
In the C language

Keep practising

Topics in Compiler Design

All CS topics ›