Question

Which one of the following statements is FALSE?

Choose one option
Official answer and solution
Official answer
B
From
Official GATE 2018 answer key

Solution

Trace the sequence of standard compiler phases to evaluate the position of type checking relative to parsing.

The standard compiler front-end phases operate in the following order:

  1. Lexical Analysis (Scanning)
  2. Syntax Analysis (Parsing)
  3. Semantic Analysis (Type checking, scope resolution)
  4. Intermediate Code Generation

Type checking requires the syntax tree or abstract syntax tree produced by the parser. Therefore, type checking is performed after parsing, not before parsing. Statement B is FALSE.

Statements A, C, and D are all standard, valid facts about grammars, intermediate representations, and call stacks.

Final answer

B

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2018 Computer Science and Information Technology (CS)
Question
18 of 65, printed as CS Q.8
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.