MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Refers to the traversal of a compiler through the entire program.
A
Pass
B
Phase
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -Pass : A pass refers to the traversal of a compiler through the entire program. Phase : A phase of a compiler is a distinguishable stage, which takes input from the previous stage, processes and yields output that can be used as input for the next stage. A pass can have more than one phase.

Detailed explanation-2: -A Compiler pass refers to the traversal of a compiler through the entire program.

Detailed explanation-3: -A multi-pass compiler is a type of compiler that processes the source code or abstract syntax tree of a program several times. This is in contrast to a one-pass compiler, which traverses the program only once. Each pass takes the result of the previous pass as the input, and creates an intermediate output.

Detailed explanation-4: -One-pass compiler is used to traverse the program only once. The one-pass compiler passes only once through the parts of each compilation unit. It translates each part into its final machine code. In the one pass compiler, when the line source is processed, it is scanned and the token is extracted.

Detailed explanation-5: -A notable example of a one-pass compiler is Turbo Pascal. Fast compilation speed that the one-pass compiler architecture enabled is often cited as the decisive factor in the success of Turbo Pascal.

There is 1 question to complete.