DEV Community

srivatsa77
srivatsa77

Posted on

Array's in c language

In computer science, an array type is a data type that represents a collection of elements values or variables, each selected by one or more indices identifying keys that can be computed at run time during program execution. Such a collection is usually called an array variable, array value, or simply array.

Arrays a kind of data structure that can store a fixed-size sequential collection of elements of the same type. An array is used to store a collection of data, but it is often more useful to think of an array as a collection of variables of the same type.

There are 2 types of C arrays. They are,

1.One dimensional array
2.Multi dimensional array
a)Two dimensional array
b)Three dimensional array
c)four dimensional array

Accessing Array Elements:-

Elements of an array are accessed by specifying the index offset of the desired element within square [ ] brackets after the array name.
Array subscripts must be of integer type. ( int, long int, char, etc.
Array indices start at zero in C, and go to one less than the size of the array.

Top comments (0)