Gate2020 cs Q19

0. 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 use’ are detected during syntax analysis.
Which of the above statements is/are TRUE?

  • Option : B
  • Explanation :
    Statement I – False, symbol table can be accessed during any phase of compiler.
    Statement II- False, For recursion support it is not necessarily be heap storage, as stack storage also supports recursion.
    Statement III – False, “Variable must be declared before use” are detected during semantic analysis.
    Hence, None of the statements is correct.
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *