All mock tests are FREE till 31 December — register to save your progress
Unit 8 · Theory of Computation and Compilers Paper 2 CS · December 2023

Arrange the following phases of a compiler as per their order of execution (start to end)

(a) Target code generation

(b) Syntax Analysis

(c) Code optimization

(d) Semantic Analysis

(e) Lexical Analysis

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: C. (e), (b), (d), (c), (a)

Explanation

Lexical analysis → syntax analysis → semantic analysis → code optimization → target code generation.

More Theory of Computation and Compilers questions