Chapter 4
Trials and Errors
IN THIS CHAPTER
Printing text to the screen
Disabling statements by using comments
Fixing compiler errors
Using the printf() function
Enjoying escape sequences
Fixing linking errors
One of the nifty things about computer programming is that feedback is immediate. You’re informed right away when something goes awry, by the compiler, the linker, or the program not running the way you intended. Believe it or not, that’s the way everyone programs! Errors happen, and even the most experienced programmer expects them.
Display Stuff on the Screen
The best way to get started programming is to create tiny code samples that merely toss up some text on the screen. It’s quick. And you learn something while you do it.
Displaying a humorous message
A computer is known as a serious device, so why not add some levity?
Exercise 4-1: Carefully type the code from Listing ...
Get C Programming For Dummies, 2nd 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.