Question DSA-ARR-0014
MediumIn row-major order, at what offset is element a[i][j] of an array with C columns stored?
- A.
j × C + i
- B.
i + j
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Arrays question
In row-major order, at what offset is element a[i][j] of an array with C columns stored?
j × C + i
i + j
Sign up free to see the answer and a step-by-step explanation.
i × j
i × C + j