GATE CS 2025, set 2 · Question 21 · Compiler Design · Multiple choice (MCQ) · 1 mark · −1/3 for a wrong answer

Consider the following statements about the use of backpatching in a compiler for intermediate code generation:
(I) Backpatching can be used to generate code for Boolean expression in one pass.
(II) Backpatching can be used to generate code for flow-of-control statements in one pass.
Which ONE of the following options is CORRECT?

  1. (A) Only (I) is correct.
  2. (B) Only (II) is correct.
  3. (C) Both (I) and (II) are correct.
  4. (D) Neither (I) nor (II) is correct.
Answer

Answer (C)

Answer from the official GATE CS 2025 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes