The input streams are sequence of characters that move from input device like keyboard to the program/computer. The output streams are sequence of characters that move from program/computer to an output device like monitor.
The stream classes supported by C++ for file input and output:
class provides facilities for file operations and consists of open() and close() member functions. This is base class for fstream, ifstream and ofstream.
class supports read operations and consists of open () with default input mode and inherits function get(), getline, read() , seekg(), tellg() from istream class defined inside iostream.h file.
class supports output operations and consists of open() with default output mode. It inherits the function put(), write(), seekp() and tellp() from ostream.
class supports both input and output operations. It contains open() with default input mode and inherits all the functions from istream and ostream classes through iostream. filebuf class sets the file buffer to read and write.