Friday, April 24, 2009

FILES

Introduction to Files


A file is a collection of related information, that is permanently stored on the disk and allows us to access and alter that information, whenever necessary.

A program typically involves either or both of the following kinds of data communication:
1. Data transfer between console unit and the program
2. Data transfer between the program and a disk file.


In I/O system of C++ handles file operations which are very much similar to the console input and output operations. It uses the streams as an interface between the programs and the files.

The stream that supplies data to the program is known as input stream and the one that receives data from the program is known as output stream. In other words, the input stream extracts data from the file and the output stream inserts data to the file.

No comments:

Post a Comment