Input stream: The stream that supplies data to the program is known as input stream.
Output stream: The stream that receives data from the program is known as output stream. fstream.h file includes the definitions for the stream classes ifstream, ofstream and fstream. In C++ file input output facilities implemented through fstream.h header file.