Skip to content
Related Articles

Related Articles

GATE | GATE CS 1996 | Question 17

View Discussion
Improve Article
Save Article
  • Last Updated : 12 Oct, 2020
View Discussion
Improve Article
Save Article

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

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!