C Arrays

  • A array is derived data type in C, which is constructed from fundamental data type of C-language.
  • An array is a collection of similar data type value is a single variable.
  • In implementation when we required ‘n’ number of variables of same data type then go for an array.
  • When we are working with arrays always memory will created in continuous memory location, so randomly we can access the data.
  • In arrays all elements will share same name with unique identification value called index.
  • Always arrays index will starts with 0 and ends with n-1.
  • When we are working with array compile time memory management will occur i.e. static memory allocation.

Syntax:

datatype Array_name[size];

  • Always size of the array must be an unsigned integer value which is greater than 0 only.
Powered by k2schools