(ii) A matrix M[-6...10, 4...15] is stored in the memory with each element requiring 4 bytes of storage. If the base address is 1025, find the address of M[4][8] when the matrix is stored in Column Major Wise.


Solution



Address of M[4][8] (Column major) = B.A. + w * [(I-Lr) + M * (J-Lc)]
= 1025 + 4[(4 + 6) + 17(8-4)]
= 1025 + 4[10 + 68]
= 1025 + 4*78
= 1337


Contact Us

REACH US

SERVICES

  • CODING
  • ON-LINE PREPARATION
  • JAVA & PYTHON

ADDRESS

B-54, Krishna Bhawan, Parag Narain Road, Near Butler Palace Colony Lucknow
Contact:+ 919839520987
Email:info@alexsir.com