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:
- A.
Index = B + (i * n + j)
- B.
Index = B + ( j * n + i)
- C.
Index = B + (i + j)
- D.
Index = B + (i * m + j)
Attempted by 33 students.
Show answer
Correct answer: A
Explore the full course: Bihar Stet Paper Ii Computer Science
Loading lesson…