In this chapter, you will learn about:
C’s approach to perform file input-output
How to create, read, write and update files
Sequential access files
Random access files
In the previous chapters, we have used functions such as scanf and printf to read and write data. These are console input-output (I/O) functions that read data from or write data to the terminal, i.e. keyboard and screen, respectively. The console I/O is preferred in interactive programs where the amount of data in I/O is small. If a program deals with I/O of large volume of data, the console I/O is not convenient and consumes a lot of time. Moreover, the entered data are stored in variables and arrays. These ...