File I/O

Though nearly every program we’ve written to date has been over without a trace as soon as its final line has been executed, C is not limited to only programs that do this. Indeed, C has the capability of file I/O as a means of storing persistent data that exists after our programs have finished running and to read information from a file during the course of the program’s execution. In this section, you are introduced to some of the basic file I/O functions they have at their disposal through stdio.h, and are guided through the process of writing some powerful I/O programs, including replicating several Linux commands they may have been using throughout the course of CS50 AP.