Here, int is a data type and the word result is the name of array. The  is however is new. The number 10 tells how many elements of the type int will be in our array. This number is often called the 'dimension' of the array. The bracket (  ) tells the compiler that we are dealing with an array.
Accessing element of an Array
Once an array is declared, we can access it and use it in our program.
Now you know that, all the array elements are numbered, starting with 0. Thus, result is not the 10th elements of the array, but the 9th.
We are using the variable i as a subscript to refer to various elements of the array. This variable can take different values and hence can refer to the different elements in the array in turn. This ability to use variables to represent subscripts is what makes arrays so useful.
Entering Data into an Array
for(i=0; i<10; i++)
printf("\nEnter elements: ");
The for loop causes the process of asking for and receiving a result from the user to be repeated 10 times. The first time through the loop, i has a value 0, so the scanf() functions will cause the value typed to be stored in the array element marks, the first element of the array. This process will be repeated until i become 9. This is last time through the loop, which is a good thing, because there is no array element like result.
Reading data from an array
for(i=0; i<10; i++)
We has been discuss about how to declare arrays, access them and read them. Let us now see how to initialize an array while declaring it as:
Here, n1,n2,... etc are equal to SIZE.
Till the array elements are not given any specific values, they are supposed to contain garbage values.
If the array is initialised where it is declared, mentioning the dimension of the array is optional as in the 2nd and 3rd example above.
Array elements in memory
Consider the following array declaration:
What happens in memory when we make this declaration?
10 bytes get immediately reserved in memory, 2 bytes each for the 5 integers. And since the array is not being initialized, all five values present in it would be garbage values. This so happens because the storage class of this array is assumed to be auto. If the storage class is declared to be static then all the array elements would have a default initial value as zero. Whatever be the initial values, all the array elements would always be present in contiguous memory locations. This arrangement of array elements in memory is shown in the following figure as: