Introduction two dimensional array in c language

  2D Array in C programming.
Let us study how to perform different operations on matrix with help of given figure.
in given figure the name of the 2 dimensional array is marks.
The two dimensional array in C language is arranged in row and column, row is denoted by letter i which starts from index 0 and column denoted by j that starts from index 0.
The marks obtained by Student Ajay in C language is 80, that has been stored at position (0, 0) in 2D array Marks( first row(0) First column).
The marks obtained by Ajay in c language can be read using marks[0][0].
similary, the marks obtained by Priya in Python language is 65 can be read using marks[2][3], and so on....
however if we want to change the marks obtained by Rutuja in C++ then we can use
the syntax  marks[1][1]=90.
the marks obtained by Rutuja in c++ changes to 90 now.
Similary we can change the marks obtained by students in different subjects.
Marks obtained by all students in all subject can be read at a time using for ,while loop in c programming language.


Note: The memory for array is allocated contiguously or continuously but not like the table structure. the given diagram is just for your understanding purpose.


Previous Topic:-->> Read and display 1D array in C || Next topic:-->>Declare 2D array.
Other Topics: