0. How to use this booklet

This is a short booklet to help a C++ programmer get up to speed with C. As a side benefit, you will probably find that you understand C++ better at the end of it.

Each chapter is meant to help you understand a topic, but you will still want to reference API descriptions for more specifics of the parameters and operating conditions. Hopefully, you’ll have the context you need to understand API documentation.

Tips

Tips call out details that you need to pay special attention to. Traps warn you of common mistakes made. Wut calls out a detail that is counter-intuitive, so make sure you pay attention.

Try It

Remember:

The only way to learn a new programming language is by writing programs in it.

You need to write some code. Make sure you try writing some programs from scratch. At the end of most sections is a starter program that you can type in and experiment with. Don’t use it as an excuse to avoid writing some of your own starter programs. It’s the only way to master a language.

Chapter Layout

Each chapter follows a consistent structure:

  • A brief overview at the top that sets the context and lists what the chapter covers.
  • The main content with explanations, code examples, and callouts (Tips, Traps, and Wuts).
  • A Try It starter program you can compile and modify.
  • Key Points summarizing the most important takeaways.
  • Exercises with a mix of questions to test your understanding.

Exercises

Don’t skip the exercises at the end of the chapters. You can get the answer key, but don’t look at the answer key before you work out the answer yourself. If you look at the answer key first, the concepts will not sink in.