MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
It reads a statement from the input, converts it to an intermediate code, executes it, then takes the next statement in sequence.
A
Assembler
B
Compiler
C
Interpreter
D
LInker
Explanation: 

Detailed explanation-1: -Code generation is the final stage of the compilation process. It takes the optimized intermediate code as input and maps it to the target machine language. Code generator translates the intermediate code into the machine code of the specified computer.

Detailed explanation-2: -The correct answer is Compiler. A compiler takes the program code (source code) and converts the source code to a machine language module (called an object file).

Detailed explanation-3: -An intermediate representation (IR) is the data structure or code used internally by a compiler or virtual machine to represent source code. An IR is designed to be conducive to further processing, such as optimization and translation.

Detailed explanation-4: -Intermediate code generator receives input from its predecessor phase, semantic analyzer, in the form of an annotated syntax tree. That syntax tree then can be converted into a linear representation, e.g., postfix notation.

There is 1 question to complete.