7.2 Array Initialization
Definition of Array
7.4 Characteristic of Array
7.5 One-Dimensional Array
7.7 Two-Dimensional Array
Three or Multi Dimensional Arrays
The sscanf () and sprintf () Functions
Consider the following example.
In the above example the value of 'a' printed is 4. 2 is assigned to 'a' before assigning 4 to it.
When we assign 4 to 'a' then the value stored in 'a' is replaced with the new value. Hence, ordinary
variables are capable of storing one value at a time. This fact is same for all the data types. But in
application the variables must be assigned to more than one value. This can be obtained with the
help of arrays. Array variables are able to store more than one values at a time.
Declaration of an array is done as follows
in t a ;
It tells to the compiler that 'a' is an integer type of arijay and can store 5 integers. The compiler
reserves 2 bytes of memory for each integer array element.