O'Reilly logo

Advanced Topics in C: Core Concepts in Data Structures by Noel Kalicharan

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 8

image

Working with Files

In this chapter, we will explain the following:

  • How to read data from a file
  • How to send output to a file
  • The difference between text files and binary files
  • The difference between internal and external file names
  • fopen and fclose
  • getc and putc
  • feof and ferror
  • fgets and fputs
  • How to write a program to compare two text files
  • How to perform input/output with binary files
  • How to work with a binary file of records
  • What are random access files
  • How to create and retrieve records from random access files
  • What are indexed files
  • How to update a random access file using an index

8.1 Reading Data from a File

Almost anything ...

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