Which ONE of the following statements is FALSE regarding the symbol table?
2025
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.
Attempted by 315 students.
Show answer & explanation
Correct answer: C
Correct answer: The statement "Symbol table is not required after the parsing phase." is FALSE.
Why this is false: The symbol table is needed after parsing for semantic analysis (for example, type checking and scope resolution), for generating intermediate or target code, for optimization passes that rely on symbol information, and sometimes during linking or runtime activities. Therefore it is not limited to the parsing phase.
Clarification of the other statements:
A symbol table is responsible for tracking scopes, types, and other attributes of identifiers; this supports correct name resolution.
A symbol table can be implemented using a binary search tree, though hash tables are often chosen for faster average lookups. Balanced BSTs give ordered traversal and guaranteed logarithmic time.
The symbol table may start getting entries when identifiers are first seen (even at lexical analysis), but full population, scope management, and semantic attributes are generally established during parsing and semantic analysis.
A video solution is available for this question — log in and enroll to watch it.