Machine-translated by Google. Questions are authored in English.
Top

Discussion

A one dimensional array A has indices 1....75. Each element is a string and takes up three memory words. The array is stored at location 1120 decimal. The starting address of A[49] is

  • A.1264
  • B.1164
  • C.1167
  • D.1267

Answer: A

Correct answer: 1264

Indices start at 1 here, not 0, so \(A[49]\) is the 49th element and 48 elements precede it. Each takes 3 words:

\[ 1120 + 3 \times (49 - 1) = 1120 + 144 = 1264 \]

Forgetting the 1-based start gives 1267, which is the distractor.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.