Compound data structures consist of a possibly variable number of basic data structures. They are given meaning through code. In this chapter, we begin our study of compound data structures with the simplest and most fundamental of all: the array, which consists of a contiguous range of more basic data structures, all of the same type. An array of int data is a typical example. An array is indexable, allowing reading or writing of each of its elements. Besides reading and writing element-wise, iteration over an array can be seen as a fundamental operation; hence, arrays and loops go hand in hand.
One application of arrays is to hold text. Textual data are called strings in programming parlance, and we study them in the second half of this chapter.
KeywordsMemory Cell Unit Test Lowercase Letter Fibonacci Sequence Pointer Arithmetic
Unable to display preview. Download preview PDF.