15. Input and Output Operations in C

All reading and writing of data up to this point has been done through your output window, otherwise known as the console or terminal. When you wanted to input some information, you either used the scanf() or getchar() functions. All program results were displayed in your window with a call to the printf() function.

The C language itself does not have any special statements for performing input/output (I/O) operations; all I/O operations in C must be carried out through function calls. These functions are contained in the standard C library. This chapter covers some additional input and output functions as well as how to work with files. Topics covered include

Covering basic I/O with putchar() and getchar() ...

Get Programming in C, Fourth 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.