A 2D array B[4][5] is stored in row-major order. The base address of the array is 5000, and
A 2D array B[4][5] is stored in row-major order. The base address of the array is 5000, and
each element occupies 2 bytes. What is the address of B[2][3]?
Show answerHide answer
Correct answer: (D) 5026
Explanation
Row-major address = Base + (i × columns + j) × size = 5000 + (2 × 5 + 3) × 2 = 5000 + 26 = 5026.