INTRODUCTION TO COMPILER DESIGN
COMPILATION PROCESS
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
The correct order of the stages of compilation is:
|
Lexical Analysis, Syntax Analysis, Code Generation, Code Optimisation
|
|
Lexical Analysis, Syntax Analysis, Code Optimisation, Code Generation
|
|
Syntax Analysis, Lexical Analysis, Code Optimisation, Code Generation
|
|
Syntax Analysis, Lexical Analysis, Code Generation, Code Optimisation
|
Explanation:
Detailed explanation-1: -Phase 1: Lexical Analysis. Phase 2: Syntax Analysis. Phase 3: Semantic Analysis. Phase 4: Intermediate Code Generation.
Detailed explanation-2: -Compilation process in C involves four steps: pre-processing, compiling, assembling, and linking. The preprocessor tool helps in comments removal, macros expansion, file inclusion, and conditional compilation.
Detailed explanation-3: -There are 6 phases in the compiler, namely, lexical analysis, syntax analysis, semantics analysis, intermediate code generation, code optimization, and code generation.
There is 1 question to complete.