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
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.