What is 2D array in C programming?
An array of arrays is known as 2D array. The two dimensional (2D) array in C programming is also known as matrix. A matrix can be represented as a table of rows and columns. Before we discuss more about two Dimensional array lets have a look at the following C program.
How to predict two-dimensional array?
Two–dimensional array can be predicted as the table that has got ‘x’ rows and ‘y’ columns. Here row number is from 0 to x-1 and column number is from 0 to y-1. 2D array y with 4 rows and 4 columns is as follows :
How to index a two-dimensional array in C?
A two-dimensional array in C will follow zero-based indexing, like all other arrays in C. Here i and j are the size of the two dimensions, i.e I denote the number of rows while j denotes the number of columns.
How to access a 1-D array as a 2-D array?
But compilers allow us to access that 1-D array as a 2-D array with help of row number and column number indices. So, any location if you want to access, you can access it with the help row number and column number. For example, you can access the second column of the first row using A  ; and you can set or get the value.