web analytics

Write down about the declaration of one dimensional array.

Declaration of one dimensional array : Like any other variable, arrays must be declared before they are used. The general form of array declaration is,


                   type variable_name[size];

The type specifies the type of elements that will be contained in the array, such as int, float etc. The size indicates the maximum number of element that can be stored inside the array. For example,

                   float height[50];

This declares the height to be an array containing 50 real numbers.
Scroll to Top