GATE 2020 CS – Question 19
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?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (D) None of I, II, and III
Explanation
The symbol table is also used in semantic analysis and code generation, so I is false. Recursion needs a stack, not a heap, so II is false. Declaration-before-use is a semantic check, so III is false.