Many applications require that information be written to or read from an auxiliary memory. |
|
Such information is stored on the memory device in the form of a data file. |
|
Thus files allow us to store information permanently, and to access and alter that information whenever necessary. |
|
In C, an extensive set of library; functions is available for creating and processing data files. Unlike other files. |
|
However, there are two different types of data files |
|
1. Stream-oriented (or standard) data files: |
|
Stream oriented data files are generally easier to work with and are therefore more commonly used. |
|
Stream-oriented data files can be subdivided into two categories. |
|
The first category are text files, consisting of consecutive characters. There characters can be interpreted as individual data items, or as components of strings or numbers. |
|
2. System-oriented (or low level) data files: |
|
System-oriented data files, often referred to as unformatted data files, organizes structures, such as arrays and structures. |
|
A separate set of library functions is available for processing stream-oriented data files of this type. |
|
These library functions provide single instructions that can transfer entire arrays or structures to or from data files. |
|
Note: Library function has been discussed in detail in next section. |
Other Recommended Posts on C programming
Post a Comment