Arrays are used to store related data items. So arrays are the very important concept to understand.

There are two types of arrays
1. One-dimensional Arrays
2. Multidimensional Arrays

### One-Dimensional Arrays:

Linear arrays or simple arrays are known as one-dimensional arrays because in this type of arrays data store in one dimension. For example, if we declare an integer array of size 5 such as
int myFirstArray[] = {56,6,10,25,1};
the data will store in one dimension you can see in figure
To read the value from the one-dimensional array we use one subscript. So also known as one subscripted array.

If we want to print 25 from our array we can use statement just like
printf("Value at index 3 : %d", myFirstArray[3]);
This will print the value of index 3 just like
Value at index 3 : 25

If I want to change the value of index 4, I will write
myFirstArray[4] = 78;
This will change the value at index 4 just as

### Multidimensional Arrays:

In multidimensional arrays, we will discuss only two-dimensional arrays.
In two-dimensional arrays, data stores in two dimensions and we have two use two subscripts to access the particular block of the array to read the value or to store the value in arrays.

We can declare and initialize a two-dimensional array just like this
int arr[2][2] = {{1,2},{3,4}};
this array will have two rows and two columns.

The first subscript in the initialization of two-dimensional array shows the total number of rows and second shows the total number of columns.

The upper array will store the values in memory such as shown in figure
Two subscripts are used to access any block in two-dimensional arrays one is for row and second is for columns, So also known as the double subscripted arrays.

If I want to print the value 2 from our two-dimensional array we will use the statement like this
printf("Value at row 0 and column 1 : %d", arr[0][1]);
This will print the value of row 0 and column 1 just like
Value at row 0 and column 1 : 2
If I want to change the value with row index 0 and column index 1, then I will write
arr[0][1] = 10;
This will change the value at row index 0 and column index 1 just as