1 Getting started

 

This chapter covers

  • Introduction to imperative programming
  • Compiling and running code

In this section, we will introduce you to a simple program that contains many of the constructs of the C language. If you already have programming experience, you may find some of the discussion feels like needless repetition. If you lack such experience, you might feel overwhelmed by the stream of new terms and concepts.

In either case, be patient. For those of you with programming or C experience, it’s very possible that you will encounter subtle details you’re not aware of or assumptions you have made about the language that are not valid. For those approaching programming for the first time, be assured that after approximately 10 pages, your understanding will have increased a lot, and you should have a much clearer idea of what programming represents.

An important bit of wisdom for programming in general, and for this book in particular, is summarized in the following quote from the Hitchhiker’s Guide to the Galaxy Douglas Adams (1979).

It’s not worth it. There are many cross references, links, and bits of side information in the text, and there is an index at the end. Follow those if you have a question. Or just take a break.

1.1 Imperative programming

1.2 Compiling and running

Summary