Chapter 12. File Input and Output

Most of the examples in this book read from the standard input—which is the keyboard—and write to the standard output—the console or terminal screen. C can also read from and write to files, giving your applications the ability to store and retrieve data.

Working with files is similar to working with standard input and output, although the process does make use of pointers. For the most part, though, your main considerations are what type of file is being referenced and what, exactly, you want to do with that file.

In this chapter you'll learn how to open, write to, read from, and close files. You'll also go through an example for parsing the stored data and, finally, learn how to work with binary files, which ...

Get C Programming: Visual Quickstart Guide now with the O’Reilly learning platform.

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