Array VAL is stored row wise starting from location 1500. Each element requires 4B.
VAL[1][1] is stored at 1500
First, we'll store 1st row 1st column, then 1st row 2nd column, and so on until all elements of 1st row are stored. Then similarly, we store 2nd row, 3rd row and so on -
VAL[1][2] is stored at 1500 + (0 * 10 + 1) * 4 = 1504
VAL[1][9] is stored at 1500 + (0 * 10 + 8) * 4 = 1532
VAL[2][1] is stored at 1500 + (1 * 10 + 0) * 4 = 1540
VAL[12][1] is stored at 1500 + (11 * 10 + 0) * 4 = 1940
VAL[12][9] is stored at 1500 + (11 * 10 + 8) * 4 = 1972
Answer - Location of VAL[12][9] is 1972.