In many of the applications it is required to store a set of similar data and manipulate them. Under such circumstances arrays are used. Arrays store elements of similar type which can be accessed by means of a number called index. Consider the following expression:
int arr[10];
this expression denotes an integer array by name 'arr' with ten elements. Each element of the array will be of type integer. Here 10 is the index or subscript denoting the size of the array.
Note: In C, indexing starts from 0, so an array arr[10] will have ten elements namely arr[0], arr[1], ... arr[9].
Just like other variables, arrays must also be declared before being used. The declaration includes the type of the element stored in the array (int, float or char), and the maximum number of elements that we will store in the array. The C compiler needs this to determine how much of memory space to reserve for the array.
The elements of an array are manipulated in the same manner as any other ordinary variable (i.e. they can be added, subtracted or compareed)