Solve Exercise 5-6: pointer-based functions

This exercise was not very fun or interesting. While I somewhat enjoyed
learning to use pointers, this was a bunch of busywork. It felt like
homework, and that's terrible. It's the first exercise I've outright
disliked. If you're writing a programming book, *don't* make exercises
like this one!