|
It is a interesting fact you have asked. When a programmer declares an array say as
int exforsys[100]
then the compiler allocates contiguous memory locations for the number of elements specified. In C and C++ the size of each item depends upon the data type of the array elements. For instance as given in example before exforsys is the array name of type int having 100 locations requested so each item would occupy 4bytes of memory and so 100 contiguous memory locations each of 4 bytes size would be allocated.
This is the process of array getting stored in memory internally.
|