data structures using in the above statementa two-dimensional array called marks has been declared that has ( rows and ( columns the first element of the array is denoted by marks[ ][ ]the second element as marks[ ][ ]and so on heremarks[ ][ stores the marks obtained by the first student in the first subjectmarks[ ][ stores the marks obtained by the second student in the first subject the pictorial form of two-dimensional array is shown in fig rows columns row row row col col col col col marks]marks][ marks][ marks][ marks][ marks[ ]marks[ ][ marks[ ][ marks[ ][ marks[ ][ marks[ ]marks[ ][ marks[ ][ marks[ ][ marks[ ][ figure two-dimensional array hencewe see that array is treated as collection of arrays each row of array corresponds to array consisting of elementswhere is the number of columns to understand thiswe can also see the representation of two-dimensional array as shown in fig marksmarksmarks[ marks[ marks[ marks[ marks[ marksmarks[ marks[ marks[ marks[ marks[ marksmarks[ marks[ marks[ marks[ figure representation of two-dimensional array marks[ ][ although we have shown rectangular picture of two-dimensional arrayin the memorythese elements actually will be stored sequentially there are two ways of storing two-dimensional array in the memory the first way is the row major order and the second is the column major order let us see how the elements of array are stored in row major order herethe elements of the first row are stored before the elements of the second and third rows that isthe elements of the array are stored row by row where elements of the first row will occupy the first locations this is illustrated in fig ( , ( , ( , ( , ( , ( , ( , ( , ( , ( , ( , ( , figure elements of array in row major order howeverwhen we store the elements in column major orderthe elements of the first column are stored before the elements of the second and third column that isthe elements of the array are stored column by column where elements of the first column will occupy the first locations this is illustrated in fig ( , ( , ( , ( , ( , ( , ( , ( , ( , ( , ( , ( , figure elements of array in column major order