An array AR[-4…6, -2 … 12] stores elements in Row Major wise, with the address AR[2][3] as 4142. If each element requires 2 bytes of storage. Find the Base address
Given i =2, j=3, W= 2 bytes B=?
AR[-4 …6, -2 ..12]
n=Uc-Lc +1
= 12 – (-2) +1
= 12 + 2 +1
= 15
Now
4142 = B +2 [15(2 – (-2)) + (3 – (-4))]
B + 2[60 + 7] = 4142
B + 134 = 4142
B = 4142-134
B= 4008