O'Reilly logo

C Programming: Visual Quickstart Guide by Marc Liyanage, Larry Ullman

Stay ahead with the world's most comprehensive technology and business learning platform.

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

Start Free Trial

No credit card required

Another Look at Pointer Variables

While pointer variables have a special role, they too are just places in memory used to store a particular kind of data (in their case, the addresses of other pieces of data). Like ordinary variables, they have a size and a location in memory (Figure 9.7). And as with ordinary variables, you can use the address-of operator to find a pointer variable's address.

Figure 9.7. The value stored in a pointer variable (x and y) is the memory address of another variable (a and b).

Our next example shows you how these locations and sizes look on your machine. It makes use of the sizeof() function, ...

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

Start Free Trial

No credit card required