GateAI
Runtime Environments

GATE CSE 2020 · Q9

MCQ1 markMedium

Time

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?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: D) None of I, II, and III

Runtime Environments
  • Statement I is FALSE: The symbol table is used throughout almost all compiler phases, including semantic analysis, intermediate code generation, code optimization, and target code generation.

  • Statement II is FALSE: Recursion requires dynamic stack allocation (activation records on a call stack) to manage function frames, not necessarily heap allocation. Heap storage is used for dynamic memory allocation where object lifetimes extend beyond function calls.

  • Statement III is FALSE: Checking whether a variable is declared before use is a context-sensitive requirement, which cannot be captured by context-free syntax analysis (parsing); it is detected during semantic analysis (type/declaration checking).

Thus, none of I, II, and III are TRUE. Correct option is (D).

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Runtime Environments previous year question is Q9 of the GATE CSE 2020 paper. Find more GATE CSE PYQs on Runtime Environments in Compiler Design, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Runtime Environments PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Runtime Environments in GATE CSE

Runtime Environments has 7 GATE CSE PYQs across 7 papers from 2012 to 2023. 4 of them are 1-mark MCQs like this one, and it is the only one in GATE CSE 2020.

How GATE tests Runtime Environments

More from GATE CSE 2020

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2020 · Q9 · MCQ

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?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.