Which of the following statements are correct? A. The first three-address…

2022

Which of the following statements are correct?

A. The first three-address instruction in the intermediate code is a leader.

B. The instruction which is exactly at the middle of the given three address code is a leader.

C. Any instruction that is the target of a conditional or unconditional jump is a leader.

D. Any instruction that immediately follows a conditional or unconditional jump is a leader.

Choose the correct answer from the options given below:

  1. A.

    A, B and C

  2. B.

    B, C and D

  3. C.

    A, C and D

  4. D.

    A, B, C and D

Attempted by 29 students.

Show answer & explanation

Correct answer: C

Key rules for identifying leaders in three-address code:

  • The first instruction of the intermediate code is a leader.

  • Any instruction that is the target of a conditional or unconditional jump is a leader.

  • Any instruction that immediately follows a conditional or unconditional jump is a leader.

The statement that an instruction exactly in the middle of the code is a leader is not a recognized rule and is incorrect.

Therefore, the correct set of statements is: the first instruction, any jump target, and any instruction immediately following a jump.

Explore the full course: Mppsc Assistant Professor Computer Science Paper 2

Loading lesson…