## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

No credit card required

### Arrays, Pointers, and Pointer Arithmetic

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).

## With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

No credit card required