Professional Documents
Culture Documents
By
Arvind Kumar
Asst. Professor
(1, 4)
(2, 1)
(2, 2)
(2, 3) Row 2
(2, 4)
(3, 1)
(3, 2)
(3, 3) Row 3
(3, 4)
Column-Major Order:
LOC (A[j, k]) = Base (A) + w [M (k-1) + (j-1)]
Row-Major Order:
LOC (A[j, k]) = Base (A) + w [N (j-1) + (k-1)]
Review Questions
• Given, in a 2-D Array the lower bound and upper bound for
first index is 3 and 11 and that for second index is 5 and 9. Find
out the size of the array.
• In any 2-D Array, which are the elements that will be always
having the same memory address for both column-major order
& Row-major order?