+1 vote
in Mathematics by kratos

An array T[90][100] is stored in the memory along the column with each element occupying 4 bytes. Find out the memory location for the element T [10][40], if the Base Address of the array is 7200.

1 Answer

+4 votes
by kratos
 
Best answer

Loc(T[I][J)) = Base(T)+W(I+J*N)

(where N is the number of rows, LBR = LBC = 0)

= 7200 + 4[10 + 40 x 90]

= 7200 + 4[10+3600]

= 7200 + 4 x 3610

= 7200 + 14440

= 21640

...