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 in their order of execution (start to end):
(a) Target code generation
(b) Syntax analysis
(c) Code optimization
(d) Semantic analysis
(e) Lexical analysis
Choose the correct answer from the options given below:

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

Show answer & explanation

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

Explanation

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

More Theory of Computation and Compilers questions