A[x][y][z] = A[6-2+1][8-2+1][10-2+1]. So A[5][7][9] is our 3-D array.
It contains 2-D arrays (comprises of 5 rows and 7 columns) arranged in 9 layers making it a 3-D array.
In total we have 5 rows({2,3,4,5,6}) in the similar way we have 7 columns({2,3,4,5,6,7,8}) and 9 layers({2,3,4,5,6,7,8,9,10}).
So in the layer 1 ({2,3,4,5,6,7,8,9,10}) we have 7 Columns * 5 Rows = 35 Elements. In the similar way each of the remaining layers also contain 35 elements.
Here we have to use column major Order to find the address of A[5][5][5]. Base Address is 500.
Here the index of z is 5. so we can have the required element in the 4 th layer({2,3,4,5,6,7,8,9,10}). Upto 3 layers({2,3,4,5,6,7,8,9,10}) we will have (3 layers *35 elements) 105 elements.
Now in the 4th layer we can find the number in 4th column({2,3,4,5,6,7,8}) in 4th row({2,3,4,5,6}). As we have to look in column major order upto 3rd column ({2,3,4,5,6,7,8}) we will have (3 columns * 5 rows) 15 elements.
Then in the 4th column upto 4 rows we have 3 elements.
Let us consider the size of each element is of 1 Byte.
So the address of the element in the location A[5][5][5] is Base Address + (Total Number of elements ) * Size of each element (We add one to get to the current element)
LOCATION(A[5][5][5]) = 500 + (105 + 15 + 3 )*1 = 623.