A file is the concept used for storing the related data in memory space usually hard disk.
A program is usually written in c++ to create a file or read or write from a file. To make the life of the programmers easy, the file is treated similar to console input or output and data is written or read from a file using the concept of stream.











