InterviewSolution
Saved Bookmarks
| 1. |
A character array B[7] [6] has a base address 1046 at 0, 0. Calculate the address at B[2] [3] if the array is stored Column Major wise. Each character requires tw o bytes of storage. |
|
Answer» B + W [(I – LBR) + M (J – LBC)] = 1046 + 2 [(2 – 0) + 7(3 – 0)] = 1046 + 2(2 + 21) = 1046 + 2(23) = 1046 + 46 = 1092 |
|