CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

A in an array [-5 ... 5, 3 ... 13] of elements. The starting location is 100. Each element occupies 2 memory cells. Calculate the location of an element A(0, 8) using row major order :

Open in App
Solution

RMO location of A[i,j]=L0+[(iilb)r2+(jjlb)]C

A[0, 8]
= 100 + [0 - (-5) * 11 + (8 - 3)] * 2
= 100 + (5 * 11 + 5) * 2
= 100 + 120
= 220

flag
Suggest Corrections
thumbs-up
0
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
2D Arrays
OTHER
Watch in App
Join BYJU'S Learning Program
CrossIcon