Site icon TestingDocs.com

Input/Output Standard Streams

Overview

In this tutorial, we will learn about Input/Output Standard Streams. A C++ program has access to standard input and output streams. There are three Input/Output Standard Streams:

stdin(Standard Input)

Standard Input is the communication input channel stream that the C++ program reads the data and takes input from the standard input device usually associated with the keyboard. The istream object std::cin reads from the standard input stream.

stdout(Standard Output)

Standard Output is the communication output channel stream that the C++ program writes its output data usually associated with the terminal window. The ostream object std::cout writes to the standard output stream.

stderr(Standard Error)

Standard Error is the communication output channel stream used by programs to output diagnostic error messages. It is usually associated by default with the terminal window. The ostream object std::cerr writes to the standard error stream.

C++ Tutorials

C++ Tutorials on this website:

https://www.testingdocs.com/c-coding-tutorials/

For more information on the current ISO C++ standard

https://isocpp.org/std/the-standard

Exit mobile version