Tuesday 12 February 2013

One Dimensional Arrays in C Programming Language



An array can be defined as a contiguous area in memory which can be referred to by a common name. Arrays are used to group sets of like objects. Each element of the array can be referred to by the array name and a subscript or index, which uniquely identifies it. In the C language subscripting begins from zero, and can be any valid integer or integer variable.

A single dimensional array in C is declared as follows:

type arrayname[n]

An array is declared as containing a certain data type and internally they are stored as a contiguous set of these data types. The value n in the array declaration defines the number of elements and hence the dimension of the array.

0 comments:

Post a Comment

Powered by Blogger.