Address of array

In a two-dimensional array, X (9, 7), with each element occupying 4 bytes of memory, with the address of the first element X (1, 1) is 3000, find the address of X (8, 5).
This question is related to TCS Interview

Questions by swatirose88

Showing Answers 1 - 9 of 9 Answers

anon1987

  • Dec 7th, 2009
 

In a two-dimensional array, X (9, 7), with each element occupying 4 bytes of memory, with the address of the first element X (1, 1) is 3000, find the address of X (8, 5).


Ans:     3000 + 4(8 * 7) + 4 * 5
            = 3000 + 224+ 20
            = 3244

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions