For a 2-D array represented in row-major order, the index formula to access…

Bihar STET · PGT (Paper 2) · Computer Science · 2023

For a 2-D array represented in row-major order, the index formula to access the element at row "i" and column "j" using the base address "B" is:

  1. A.

    Index = B + (i * n + j)

  2. B.

    Index = B + ( j * n + i)

  3. C.

    Index = B + (i + j)

  4. D.

    Index = B + (i * m + j)

Attempted by 33 students.

Show answer

Correct answer: A

The worked solution is available to enrolled students.

Explore the full course: Bihar Stet Paper Ii Computer Science

Loading lesson…