MENU
Question -

An integer array A [30] [40] is stored along the column in the memory. If the element A[20][25] is stored at 50000, find out the location of A[25] [30].



Answer -

A[i] [j] = B+W x [No. of rows x (I-Lr) + (J-Lc)]
 A[20] [25] = B + 2x [30x (20-0) + (25-0)]
 50000 = B+2x[30x(20-0)+(25-0)]
 B = 48750
 A[7] [10] = 48750+ 2x[30x(7-0)+(10-0)]
 = 49190

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
Any questions? Ask us!
×