GATE CS 2025 Set 1 | Question 12

MCQ · 1 mark · −0.33

Which ONE of the following statements is FALSE regarding the symbol table?

  1. Option A: Symbol table is responsible for keeping track of the scope of variables.
  2. Option B: Symbol table can be implemented using a binary search tree.
  3. Option C: Symbol table is not required after the parsing phase. (correct)
  4. Option D: Symbol table is created during the lexical analysis phase.

Answer

(C)

Explanation

The symbol table is used by nearly every phase of the compiler, not only up to parsing. Semantic analysis uses it for type and scope checks, and intermediate code generation and code generation read the type, size and memory offset of each name from it, so statement (C) is false. The other statements are true: the table records the scope of names (A), it can be organised as a list, a binary search tree or a hash table (B), and entries for identifiers are first made while the lexical analyser scans the source (D).

Answer: C