Arrays are important features in many programs. They enable you to store several items of related information in a convenient fashion. We will devote all of Chapter 10, “Arrays and Pointers,” to arrays, but because arrays are often used with loops, we want to introduce them now.
An array is a series of values of the same type, such as 10 chars or 15 ints, stored sequentially. The whole array bears a single name, and the individual items, or elements, are accessed by using an integer index. For example, the declaration
announces that debts is an array with 20 elements, each of which can hold a type float value. The first element of the array is called debts, the second element is called debts, and so on, up to ...