A single dimensional array is a data structure that can be used to store a list of values of same data type. Such arrays must be declared by giving the data type of the values that are stored in the array and array size. The declaration int number[100]; creates an array of 100 integers.
Array elements are stored in contiguous memory locations and referenced using the array name and a subscript. Any non-negative integer value can be used as a subscript and the subscript 0 aways refers to the first element in any array.
A string is an array of characters that is terminated by the null characters.
Strings can always be processed using standard array processing techniques.
String storage can be created by declaring an array of characters.
Review Questions
Explain the rules for initializing an array variable.
What are the properties of an array?
What are single subscripted, double subscripted and triple subscripted arrays?