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
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.
Please log in or register to report this question.