Which of the following formula is used to find the address of \( a_{ij} \) in a \( m \times n \)…
In row-major order, the preceding i − 1 rows contain (i − 1)n elements. Adding the position j within the current row gives the one-based linear position (i − 1)n + j.
Choose your answer
Which of the following formula is used to find the address of in a matrix, when the elements are stored in row major order?
Answer and explanation
Correct answer A
In row-major order, the preceding i − 1 rows contain (i − 1)n elements. Adding the position j within the current row gives the one-based linear position (i − 1)n + j.
Practice for these exams
-
Tamil Nadu SET (TNSET)