Q24,p2,d14. Consider an array A[20, 10], assume 4 words per memory cell and the base address of array A is 100. What is the address of A[11, 5] ? Assume row major storage.
(A) 560 (B) 565
(C) 570 (D) 575
Answer A.
Explanation.
(0,0)---------(0,9)
-
-
-
-
-
(10,0)-------(10,9)
(11,0),---(11,4),.
Base address
is100.
Address of
(11,5)= 100+110x4+20=560.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.