Prashnikaप्रश्निका
Code
About
‹ Back to the paper

Question 12

2 marks

Computer ScienceISC 2022 Computer Science - Specimen paper (Semester 1), Paper 1MCQArrays, Strings

Choose the correct option.

A matrix MAT[10][15] is stored in the memory in Row Major Wise with each element requiring 2 bytes…

A matrix MAT[10][15] is stored in the memory in Row Major Wise with each element requiring 2 bytes of storage. If the base address at MAT[1][2] is 2215, then the address of MAT[3][7] will be:
  • (a)2285
  • (b)2315
  • (c)2319
  • (d)None of the above
Open in the 2D array visualiser

Answer

Answer

Correct option: (a)

Answer: (a) 2285 Row major with 15 columns: distance from MAT[1][2] to MAT[3][7] = (2 rows x 15 + 5) = 35 elements, x 2 bytes = 70. Address = 2215 + 70 = 2285.