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 starting at location 1120 decimal. The starting address of A[49] is

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

Answer: C

Correct answer: 1264

The indices start at 1, so A[49] has 48 elements before it, each of 3 words:

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

Treating the array as 0-based would give 1267 - the distractor the question is testing for.

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

Post your comment

Please log in or register to post a comment.