Open In App
Related Articles

GATE | GATE CS 1996 | Question 17

Improve Article
Improve
Save Article
Save
Like Article
Like

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

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.

Last Updated : 12 Oct, 2020
Like Article
Save Article
Previous
Next
Similar Reads