Array - C Tutorial

Array

You can store multiple variables of the same type in an array data structure. You declare an array by specifying the type of its elements.

Syntax of Array Declaration

    type arrayName[size];

Array Overview

An array has the following properties:

  • An array can be Single-Dimensional or Multidimensional
  • The number of dimensions and the length of each dimension are established when the array instance is created. These values can't be changed during the lifetime of the instance.
  • Arrays are zero indexed: an array with n elements is indexed from 0 to n-1.
  • Array elements can be of any type, including an array type.