Part II. Simple Programming

This part builds on the basics to round out our description of simple C programming. In this part, we learn the rest of the control statements as well as some more advanced operations such as bit operations. Finally, we get an introduction to some more sophisticated programming tasks such as file I/O and debugging.

Chapter 8 describes additional control statements. Included are for, break, and continue. The switch statement is discussed in detail.

Chapter 9 introduces local variables, functions, and parameters.

Chapter 10 describes the C preprocessor, which gives the programmer tremendous flexibility in writing code. The chapter also provides the programmer with a tremendous number of ways to mess up. Simple rules that help keep the preprocessor from becoming a problem are described.

Chapter 11 discusses the logical C operators that work on bits.

Chapter 12 explains structures and other advanced types. The sizeof operator and the enum type are included.

Chapter 13 introduces C pointer variables and shows some of their uses.

Chapter 14 describes both buffered and unbuffered input/output. ASCII versus binary files are discussed, and you are shown how to construct a simple file.

Chapter 15 describes how to debug a program, as well as how to use an interactive debugger. You are shown not only how to debug a program, but also how to write a program so that it is easy to debug. This chapter also describes many optimization techniques for making your program run faster ...

Get Practical C Programming, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.