GATE | GATE CS 1996 | Question 17
The pass number for each of the following activities
- Object code generation
- Literals added to literal table
- Listing printed
- Address resolution of local symbols
That occur in a two pass assembler respectively are
(A) 1, 2, 1, 2
(B) 2, 1, 2, 1
(C) 2, 1, 1, 2
(D) 1, 2, 2, 2
Explanation: A multi-pass compiler is a type of compiler that processes the source code or abstract syntax tree of a program several times. Two-pass compiler, on the first check the syntax of statements and construct a table of symbols , while on the second pass it actually translates program statements into machine language.
Object code generation – second pass compiler.
Literals added to literal table – first pass compiler.
Listing printed- second pass compiler.
Address resolution of local symbols that occurs in a two pass assembler respectively – first pass compiler.
Quiz of this Question
Level Up Your GATE Prep!
Embark on a transformative journey towards GATE success by choosing Data Science & AI
as your second paper choice with our specialized course. If you find yourself lost in the vast landscape of the GATE syllabus, our program is the compass you need.