Skip to Main Content
Smaller C
book

Smaller C

by Marc Loy
May 2021
Intermediate to advanced content levelIntermediate to advanced
311 pages
7h 45m
English
O'Reilly Media, Inc.
Content preview from Smaller C

Chapter 2. Storing and Stating

The essence of programming is the manipulation of data. A programming language provides humans an interface for telling the computer what that data is and what you want to do to that data. Languages designed for powerful machines may hide (or infer) a lot of the details about storing data, but C remains fairly simple in this regard. Perhaps simple is the wrong word, but its approach to data storage is straightforward while still allowing for complex manipulation. As we’ll see in Chapter 6, C also provides the programmer with a window into the low-level aspects of where the data is stored in the computer’s memory. When we start working directly with microcontrollers in the latter half of this book, that access will become more important.

For now though, I want to tackle some of the basics of C’s syntax so that we can start composing original programs rather than just copying lines of code from a book. This chapter has plenty of those lines, and you are heartily encouraged to copy them as you read! But hopefully, we’ll get to the point where you can create novel answers to your own programming challenges.

Note

If you already feel comfortable with programming from your experience in another language, feel free to skim this chapter. You should read “printf() and scanf()” on the printf() and scanf() functions, but other sections will likely be familiar.

Statements in C

Another concept you hear about as a fundamental element of programming is the notion ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Intermediate C Programming for the PIC Microcontroller: Simplifying Embedded Programming

Intermediate C Programming for the PIC Microcontroller: Simplifying Embedded Programming

Hubert Henry Ward

Publisher Resources

ISBN: 9781098100322Errata PageSupplemental Content