No announcement yet.

what is the use of array in c language??

  • Filter
  • Time
  • Show
Clear All
new posts

  • what is the use of array in c language??

    Declaration of arrays:

    Like any other variable arrays must be declared before they are used. The general form of declaration is:
    type variable-name[50];
    The type specifies the type of the elements that will be contained in the array, such as int float or char and the size indicates the maximum number of elements that can be stored inside the array for ex:
    float height[50];
    Declares the height to be an array containing 50 real elements. Any subscripts 0 to 49 are valid. In C the array elements index or subscript begins with number zero. So height [0] refers to the firstelement of the array. (For this reason, it is easier to think of it as referring to element number zero, rather than as referring to the first element).
    As individual array element can be used anywhere that a normal variable with a statement such as
    G = grade [50]
    Cheap International Phone Calls

  • #2
    your message have error.
    Download Free Templates | word templates