Delicious Digg Facebook Favorites More Stumbleupon Twitter

Monday 10 September 2012

Array

Array



An array  is a collection of similar elements.
Their similar elements can be all integers or floats or chars.
The array of characters is called as a string or word.
The array of integers or floats is called by the original name(n) as array.
The first element in the  array  is numbered as ‘0’ , there fore  the last element
Is one less than the original size(n-1) of the array.
An array is also termed as “Subscripted variable” .
The elements inside an array are stored in continuous memory locations ,irrespective  of its size.
Array declaration :-  

datatype variablename arraylenth;
Example :-   
                         int array[];
                         int a[10];
                         int a[3]={4,6,12};

Arrays are divided into 2 types.
They are,
                    
                        * one dimensional array.
                        * Two/multi dimensional array.


     

0 comments:

Post a Comment