Sample Video Frame

Created by Zed A. Shaw Updated 2024-11-15 13:50:32
 

Exercise 15: Pointers, Dreaded Pointers

Pointers are famous mystical creatures in C. I'll attempt to demystify them by teaching you the vocabulary to deal with them. They actually aren't that complex, they're frequently abused in weird ways that make them hard to use. If you avoid the stupid ways to use pointers, then they're fairly easy.

To demonstrate pointers in a way that we can talk about them, I've written a frivolous program that prints a group of people's ages in three different ways:

View Source file ex15.c Only

Previous Lesson Next Lesson

Register for Learn C the Hard Way

Register today for the course and get the all currently available videos and lessons, plus all future modules for no extra charge.