Which is the most appropriate match for the items in the first column with the…

2001

Which is the most appropriate match for the items in the first column with the items in the second column?

X. Indirect Addressing        I. Array implementation
Y. Indexed Addressing         II. Writing relocatable code
Z. Base Register Addressing   III. Passing array as parameter

  1. A.

    (X, III) (Y, I) (Z, II)

  2. B.

    (X, II) (Y, III) (Z, I)

  3. C.

    (X, III) (Y, II) (Z, I)

  4. D.

    (X, I) (Y, III) (Z, II)

Attempted by 8 students.

Show answer & explanation

Correct answer: A

Indirect addressing uses an address/pointer to access the operand. This is suitable for passing an array as a parameter, because the called routine can receive the address of the array.
Indexed addressing computes an effective address using a base address plus an index. This directly supports array implementation, where different elements are reached by changing the index.
Base register addressing uses a base register to hold a relocation base address. This supports writing relocatable code because addresses can be interpreted relative to the base register.
Thus, X matches III, Y matches I, and Z matches II. Hence, option A is correct.

Explore the full course: Gate Guidance By Sanchit Sir