Answer:

The data that a program has saved in a file remain in the file, even when the program is no longer running.

Input and Output

Data saved in variables vanishes when the program stops. But data saved in a file remains there when the program stops. So your occasional credit card charges eventually get saved in a disk file, where they remain for months (unfortunately).

Data flowing into a program are called input. When a file is used as a source of data for a program it is called an input file. A program is said to read data from an input file.

Data flowing out of a program are called output. When a file is used as the destination of data for a program it is called an output file. A program is said to write data to an output file.

The same file can be used as an output file for one program, and later as an input file for another (or the same) program. For example, when you use a word processor you typically read data from a file (often called a document), then later save the data to the same file.

Sometimes the same file can be used simultaneously as an input file and as an output file. (These notes do not cover how to do that.)

QUESTION 3:

Are files the only semipermanent way to store electronic data ?