1.

A Two-dimensional Array X (7,9) Is Stored Linearly Column-wise In A Computers Memory. Each Element Requires 8 Bytes For Storage Of The Value. If The First Byte Address Of X (1,1) Is 3000, What Would Be The Last Byte Address Of X (2,3)?

Answer»

USE the FORMULAE

X(i,J)=Base+w[n(i-1)+(j-1)]
where m=7 ,n =9 ,i=2 ,j=3
hence 3000+8*[9(2-1)+(3-1)]
=3000+8*(9+2)
=3000+8*11=3088

use the formulae

X(i,j)=Base+w[n(i-1)+(j-1)]
where m=7 ,n =9 ,i=2 ,j=3
hence 3000+8*[9(2-1)+(3-1)]
=3000+8*(9+2)
=3000+8*11=3088



Discussion

No Comment Found