Skip to content
Related Articles

Related Articles

Improve Article

GATE | GATE CS 1996 | Question 17

  • Last Updated : 12 Oct, 2020

The pass number for each of the following activities

  1. Object code generation
  2. Literals added to literal table
  3. Listing printed
  4. 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


Answer: (B)

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.

My Personal Notes arrow_drop_up
Recommended Articles
Page :