O'Reilly logo

C Programming: Visual Quickstart Guide by Marc Liyanage, Larry Ullman

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required