What is the address of element 19 25 of a150 by 200 array of

What is the address of element (19, 25) of a150 by 200 array of words whose base address is 0x1004 52C4D? (Show your work)

If it is a row major array?

Solution

Given 2d array of size 150x200
So every row it has 150 elements.
so 19th row meand it has already passed 18 rows ==> (18x150 ==> 2700)
Then 25th column means ==> 2700+25 ==> 2725 element.

0x1004 52C4D ==> 4100 (decimal)
So 4100 + 2725 ==> 6825 (decimal)
6825 (decimal) ==> 1AA9 (hexadecimal)

What is the address of element (19, 25) of a150 by 200 array of words whose base address is 0x1004 52C4D? (Show your work) If it is a row major array?SolutionGi

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site