Question 86
Consider a 2D integer array A of dimensions 10 x 20 stored in row-major order starting at base address 1000. If each integer occupies 4 bytes, calculate the memory address of element A[4][5].
Detailed Solution
Address = Base + (row * Total_Cols + col) * size = 1000 + (4 * 20 + 5) * 4 = 1000 + 85 * 4 = 1000 + 340 = 1340.