4. Can I See Results?

With printf()

image

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 for output is the printf() function. There is no actual command that performs output, but the printf() function is a part of every C compiler and one of the most-used features of the language.

What printf() Does

In a nutshell, printf() produces output on your screen. As Figure 4.1 shows, ...

Get Absolute Beginner’s Guide to C, 2nd Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.