Which of the following is the CORRECT sequence of the phases of a compiler?
2023
Which of the following is the CORRECT sequence of the phases of a compiler?
- A.
Lexical analysis, syntax analysis, intermediate code generation, code generation, code optimization
- B.
Lexical analysis, intermediate code generation, syntax analysis, code generation, code optimization
- C.
Lexical analysis, intermediate code generation, syntax analysis, code optimization, code generation
- D.
Lexical analysis, syntax analysis, intermediate code generation, code optimization, code generation
Attempted by 82 students.
Show answer & explanation
Correct answer: D
The standard order among the listed phases is lexical analysis, syntax analysis, intermediate code generation, code optimization, and then code generation.