You have already seen the printf() function, which prints values to the screen. In this chapter, you'll learn many of the options available with printf(). In addition to output, your programs become much more powerful if you learn how to get input from the keyboard. The scanf() is a function that mirrors printf(). Instead of sending output values to the screen, scanf() accepts values that the user types at the keyboard.
printf() is your basic screen output function, and scanf() is your basic keyboard input function. printf() and scanf() offer beginning C programmers output and input functions they can use with relative ease. Both of these functions are limited especially scanf() but they do enable your programs to send output and to receive input.