GATE CS 2025 Set 1 | Question 12

Compiler Design › Basics & Lexical · MCQ · 1 mark · Answer: C

  1. Question 12Compiler Designmcq1 mark
    Which ONE of the following statements is FALSE regarding the symbol table?
    • A.
      Symbol table is responsible for keeping track of the scope of variables.
    • B.
      Symbol table can be implemented using a binary search tree.
    • C.
      Symbol table is not required after the parsing phase.
      ✓
    • D.
      Symbol table is created during the lexical analysis phase.

    Answer: C

    Solution

    Answer: (C) — this statement is FALSE. The symbol table is used well beyond parsing — in semantic analysis (type checking, scope resolution), intermediate code generation, optimization and final code generation. So "not required after the parsing phase" is false. The other statements are true: the symbol table tracks scope (A), can be implemented with a BST/hash table (B), and entries begin to be created as early as lexical analysis (D).

More GATE PYQ on Basics & Lexical

All GATE CS Compiler Design PYQ →

Attempt GATE CS 2025 Set 1 in real GATE exam mode

Full paper with a timer, the GATE interface and a topic-wise analysis — free.

Create free account →