MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
An intermediate language should be
A
Close to target machine
B
Machine independent
C
All operators of high-level language supported
D
All of the other options
Explanation: 

Detailed explanation-1: -A language that is generated from programming source code, but that cannot be directly executed by the CPU. Also called “bytecode, ” “p-code, ” “pseudocode” or “pseudo language, ” the intermediate language (IL) is platform independent. It can be run in any computer environment that has a runtime engine for the language.

Detailed explanation-2: -Types of Intermediate Representations Flat, tuple-based, generally three-address code (quadruples) Flat, stack-based.

Detailed explanation-3: -It should not include too much machine specific detail. It provides a separation between front and back ends which helps compiler portability. Code generation and assignment of temporaries to registers are clearly separated from semantic analysis.

Detailed explanation-4: -Examples of intermediate-level languages are assembly languages, such as PL/I, BASIC, AND Fortran.

There is 1 question to complete.