Introduction to Programming Arrays in C An Array is a convenient way to store objects. It is essentially a collection of objects arranged in a particular order. Examples of Arrays: 1.) A chessboard's squares 2.) The computers in the lab are arranged in an array 3.) Pages of a book The main use of Arrays in programming is the use of indices (subscripts). One variable can be used, with indicies, to refer to particular numbers or values in an array. For example : x[0] = 9 x[1] = 10 x[2] = 19 x[3] = 29 x[4] = 48 x[5] = 77 . . . x[n] = x[n-2] + x[n-1] , in general for this pattern. Arrays in C++: An array, in C++, is a set of variables all of the same data type. An array is composed of variables (or elements) stored in consecutive memory locations. Each element of the array has an associated index number (or subscript number). An array, in C++, has the following syntax: data_type variable_name[size] Note: the data_type is the variable data type whether it is float, int, long int, long float etc. The variable_name is whatever you want to call it. The size is the number of elements in the array. Example: int arr[100]; // declares the variable name arr to be an array with 100 elements int i = 1; // initialize i . . while(i <= 100) { // loop that assigns values to the elements in the array arr[i] = 2 * i; ++ i; } Therefore, in memory, we have: arr[1] = 2 arr[2] = 4 arr[3] = 6 . . . arr[100] = 200