MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Stage of compilation that removes redundant code and replaces inefficient code.
A
Lexical Analysis
B
Syntax Analysis
C
Semantic Analysis
D
Code Generation
E
Code Optimisation
Explanation: 

Detailed explanation-1: -Code optimisation occurs throughout the compilation process and, in particular, as part of the code generation stage. The optimiser may identify redundant or repeated code, and remove or rearrange the code as necessary. This ensures the code runs as fast as possible.

Detailed explanation-2: -At an overview level, the process can be split into four separate stages: Preprocessing, compilation, assembly, and linking.

Detailed explanation-3: -Code Generation In the sixth and the final phase of the compiler, code generation receives as input the optimized intermediate code and translates the optimized intermediate code into the target machine language. This phase involves assembly language usage to convert optimized code into target machine format.

There is 1 question to complete.