Introduction to Files In C
FILES:
A file is an external collection of related data treated as a unit.
The primary purpose of a file is to keep a record of data.
Record is a group of related fields. Field is a group of characters they convey meaning.
Files are stored
...See more
in auxiliary or secondary storage devices. The two common forms of secondary storage are disk (hard disk, CD and DVD) and tape.
Each file ends with an end of file (EOF) at a specified byte number, recorded in file structure.
A file must first be opened properly before it can be accessed for reading or writing. When a file is opened an object (buffer) is created and a stream is associated with the object.
FILE NAME:
File name is a string of characters that make up a valid filename.
Every operating system uses a set of rules for naming its files.
When we want to read or write files, we must use the operating system rules when we name a file.
The file name may contain two parts, a primary name and an optional period with extension.
Example: input.txt
program.c
Views: 2534
Added: 4 years ago
Answer the Question