GATE / CS ARCHIVE

GATE CSE 2025 SET 1 / QUESTION 12

Locating symbol-table uses beyond parsing

Compiler Design · Semantic Analysis & Type Checking · Full GATE CSE 2025 Set 1 paper

GATE 2025 Set 1, Q12 1 mark · MCQ
Report issue

Semantic Analysis & Type Checking

Question 12, GATE 2025: Which claim about a compiler symbol table is false? A It tracks variable scope. B It can use a binary search tree. C It is no longer needed after parsing. D It is created during lexical analysis.
Tap to enlarge
Your answer
Answer & solution

Official answer: C

Approach: Follow identifier information through the compiler rather than treating parsing as the last compilation phase.
A symbol table maps names to attributes such as type, declaration scope and storage location. Scope checking needs those associations, so A describes a normal role. A binary search tree can support lookup and insertion by identifier name, so B is a valid implementation possibility even though hash tables are also common.
After parsing, semantic analysis still needs symbol information for declaration and type checks; later code generation may need storage and addressing attributes. Therefore C’s claim that the table is unnecessary after parsing is false, and C is the keyed answer.
D reflects the conventional introductory pipeline in which lexical analysis begins identifier entries. Real implementations may create or enrich tables at other stages, so D should not be read as a universal requirement on every compiler architecture. The decisive false claim in the intended model is C.

Original paper, page 12 · Answer key