Consider a 2-dimensional array x with 10 rows and 4 columns, with each element…

ISRO Scientist/Engineer SC · 2020 · Computer ScienceModified — slightly modified from the official paper; see the solution

Consider a 2-dimensional array x with 10 rows and 4 columns, with each element storing a value equivalent to the product of the row number and column number. Count row and column positions from 1 for the element values, although the array indices start at 0. The array is stored in row-major format. If the first element x[0][0] occupies the memory location with address 1000 and each element occupies only one memory location, which locations (in decimal) hold a value of 10?

  1. A.

    1018, 1019

  2. B.

    1022, 1041

  3. C.

    1017, 1036

  4. D.

    1000, 1399

Attempted by 633 students.

Show answer

Correct answer: C

The worked solution is available to enrolled students.

Explore the full course: Iocl Engineers Officers Grade A Paper 2

Loading lesson…