CameraIcon
CameraIcon
SearchIcon
MyQuestionIcon
MyQuestionIcon
1
You visited us 1 times! Enjoying our articles? Unlock Full Access!
Question

Representation of two dimensional array in memory is -

A
Row-major
No worries! We‘ve got your back. Try BYJU‘S free classes today!
B
Column-major
No worries! We‘ve got your back. Try BYJU‘S free classes today!
C
Both (1) and (2)
Right on! Give the BNAT exam to get a 100% scholarship for BYJUS courses
D
None of these
No worries! We‘ve got your back. Try BYJU‘S free classes today!
Open in App
Solution

The correct option is B Both (1) and (2)

Representation of two dimensional array in memory is row-major and column-major.

A 2D array has a type such as int[][] or String[][], with two pairs of square brackets. The elements of a 2D array are arranged in rows and columns, and the new operator for 2D arrays specifies both the number of rows and the number of columns.

A two-dimensional matrix a, two dimensional address space must be mapped to one-dimensional address space. In the computer's memory matrices are stored in either Row-major order or Column-major order form.

Row-major order and column-major order are methods for storing multidimensional arrays in linear storage such as random access memory.


924440_918877_ans_07fe416f8272415085dee97a5354f15d.PNG

flag
Suggest Corrections
thumbs-up
0
similar_icon
Similar questions
View More
Join BYJU'S Learning Program
similar_icon
Related Videos
thumbnail
lock
Integration as Anti-Derivative
MATHEMATICS
Watch in App
Join BYJU'S Learning Program
CrossIcon