Which of the following is a phase of a compilation process
A. Lexical analysis
B. Code generation
C. Both of the above
D. Static analysis
E. None of the above
Answer: Option C
Solution (By Examveda Team)
Compiler operates in various phases each phase transforms the source program from one representation to another. Every phase takes inputs from its previous stage and feeds its output to the next phase of the compiler.There are 6 phases in a compiler. Each of this phase help in converting the high-level langue the machine code. The phases of a compiler are:
I. Lexical analysis
II. Syntax analysis
III. Semantic analysis
IV. Intermediate code generator
V. Code optimizer
VI. Code generator

Join The Discussion