MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

COMPILER DESIGN

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
An interpreter reads the whole source code at once, creates tokens, checks semantics, generates intermediate code, executes the whole program and may involve many passes.
A
True
B
False
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -Intermediate code is used to translate the source code into the machine code. Intermediate code lies between the high-level language and the machine language.

Detailed explanation-2: -A compiler reads the whole source code at once, creates tokens, checks semantics, generates intermediate code, executes the whole program and may involve many passes.

Detailed explanation-3: -Phase 1: Lexical Analysis Here, the character stream from the source program is grouped in meaningful sequences by identifying the tokens. It makes the entry of the corresponding tickets into the symbol table and passes that token to next phase.

Detailed explanation-4: -Explanation: The compiler is that program which translates the whole high-level code into the machine code at once.

There is 1 question to complete.