October 2004
Beginner
408 pages
9h 24m
English
You've already learned about arrays (in Chapter 6, “Working with Arrays”) and how to use the square brackets to access individual elements (the square brackets are technically referred to as the subscription operator). Now that you have an understanding of pointers, you'll learn how to use them to access array elements by performing calculations on the base address of the array. Such address calculations are called address or pointer arithmetic.
What is an array's base address? The elements of an array are laid out sequentially in memory. An array's base address is simply the address of the array's first element (Figure 9.13).
Read now
Unlock full access