ABSTRACT

Every program receives some input, processes it, and produces output. The C language provides us with several predefined functions that help us supply input to the program and generate output. The most common functions that every programmer should know are scanf() and printf(). To provide input to a program, we need the scanf() function, and to produce the output, we require the printf() function. Other than these two, various predefined functions exist for different purposes. Some of them include: getchar(), putchar(), gets(), puts(), getch(), getche(), and putch(). This chapter explains all of these with simple C programs. It also explains where to use them and what their differences are. Among these functions, printf() and scanf() are known as formatted functions; all the others are called unformatted functions. The chapter also describes a new header file conio.h where all these unformatted function definitions are present.