O'Reilly logo

C Programming Absolute Beginner’s Guide, Third Edition by Dean Miller, Greg Perry

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required