Saturday, July 13, 2019

Array In C Language.

Array In C Language.



Array is a collection of similar data types.It stores the fixed size data element. The size and the type of datas are same in array.

       Array is a derived datatype which can store primitive type of data like int,float,char,double,etc.

     Syntax of Array Declaration:

      data_type array_name[size_of_array];

        Types of array: 
     
                        1.single-dimensional array;
              2.multidimensional array


        1.Single Dimensional array: 


     
simple array which is defines above is also called single or one dimensional array.

        2.Multidimensional array/Two-dimensional array:
      
The two dimension array can be deines as array of array. Two dimensional array is used two create matrix.A matrix can be represents as a table of row or colunm.
     
It stores bulk of data.

      Syntax of multidimensional array declaration:

      data_type name_of _array[size1][size2];


EmoticonEmoticon