To solve these kind of problems, please do not use any kind of formulas, we just need to understand how 3D arrays will store thats it solution is over.
Now see given question A[90][30][40], which means total there are 90, 2D arrays were present and size of each 2D array is 30*40 (which is 1200 elements)
However the array is 2D,3D,4D.....nD it will store it as 1D array only in the memory
It is important to see whether the array is stored in RMO or CMO.
as per the given question it is stored ad CMO.
address of an element = BA + (number of elements to cross to reach that element) * size of each element
So lets see to reach A[20][20][30], we need to see how many elements to cross
1) 19 -2D array elements = 19*30*40 = 19*1200
2)now we are at 20th 2D array, here we need to see RMO or CMO
CMO:-
2.1)column elements cross = 29 columns = 29 × 30 (because each column contains 30 elements)
2.2)now to reach 20th 2D element (20,30) we need to cross some more elements in 30th column = 19 elements
So total ( 19×30×40) + (29×30) + 19 = 23689 elements to cross, it is given that each element size is 1B, and BA is 10 so final anser is 10 + 23689 = 23699
RMO:-
3.1)row elements cross = 19 rows = 19×40 (because each row contains 40 elements)
3.2)now to reach 20th 2D element (20,30) we need to cross some more elements in 20th row = 29 elements
So total (19×30×40) + (19×40) + 29 = 23589 elements
So answer is 23589 +10 = 23599
PLEASE DONT USE ANY FORMULA