Write down about the declaration of one dimensional array.

Last updated on June 13th, 2020 at 08:26 pm

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.

Leave a Reply

Your email address will not be published. Required fields are marked *