Note: Questions is incomplete without given the address of first element, for this solution I am assuming it to be A[0][0][0]
if given array dimension A[30][40][50] it means there are 30 frames. in each frame 40 rows & 50 columns.
array would be like [i...29][i...39][i...49]
note: for this case i=0
address of element= base address + total Bytes you have crossed to get to that element.
For R.M.O.
to get address of A[5][6][7],
we have to cross (5-i) frames and 40*50 elements in each frame total (5-i)40*50 elements
Now we have reached to the frame whose element's address we want to get, From here it is like 2D array
so, we have to cross (6-i) rows in each rows 50 elements, total (6-i)*50 elements.
now we are at row where element is, sowe just have to cross (7-i) columns to get to that element
Therefore address will be 150+(4*((5-i)*40*50+(6-i)*50+(7-i))).