© Shirish Chavan 2017

Shirish Chavan, C Recipes, https://doi.org/10.1007/978-1-4842-2967-5_6

6. Data Files

Shirish Chavan

(1)Sangli, Maharashtra, India

A file is a collection of data that is named and saved in the secondary storage (like on a disk or tape). The contents of a file can be retrieved and modified as per the requirements of the storage.

Every piece of data that is loaded in the primary or secondary memory of a computer is not a file. It is only when you save that data on the disk and name it suitably that the collection of data assumes the status of a file. Why use files? Read on. Primary memory is volatile; when you switch off the computer, everything that is stored in primary memory is lost. Therefore, it is necessary to save the data ...

Get C Recipes: A Problem-Solution Approach now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.