4. Your World Premiere—Putting Your Program’s Results Up on the Screen

In This Chapter

Using printf()

Printing strings

Coding escape sequences

Using conversion characters

Putting it all together with a code example

If neither you nor anybody else could see your program’s output, there would be little use for your program. Ultimately, you have to be able to view the results of a program. C’s primary means of output is the printf() function. No actual command performs output, but the printf() function is a part of every C compiler and one of the most used features of the language.

How to Use printf()

In a nutshell, printf() produces output on your screen. As the sample code listings in Chapters 2, “Writing Your First C Program,” and ...

Get C Programming Absolute Beginner’s Guide, Third 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.