A one-dimensional array A has indices 1 through 75. Each element is a string…

2009

A one-dimensional array A has indices 1 through 75. Each element is a string that occupies three memory words. The base address of the array is decimal location 1120. What is the starting address of A[49]?

Answer: C. 1264ConceptFor a one-dimensional array with lower bound L and element width w, the address of A[i] is found by adding the storage occupied by the preceding…

  1. A.

    1267

  2. B.

    1164

  3. C.

    1264

  4. D.

    1169

Attempted by 796 students.

Show answer & explanation

Correct answer: C

Concept

For a one-dimensional array with lower bound L and element width w, the address of A[i] is found by adding the storage occupied by the preceding elements to the base address.

Therefore, Address(A[i]) = Base + (i − L) × w. The subtraction counts how many complete elements come before A[i].

Application

  1. Identify the values: Base = 1120, i = 49, L = 1, and w = 3 memory words.

  2. Count the preceding elements: i − L = 49 − 1 = 48.

  3. Find their storage: 48 × 3 = 144 memory words.

  4. Add the offset to the base: 1120 + 144 = 1264.

Cross-check

A[1] starts at 1120. Moving forward by 48 elements, with 3 words per element, advances the address by 144, so A[49] starts at 1264.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…