cout
-
In C++, the standard input is from the keyboard, and the standard output is to the screen.
-
Standard input/output (I/O) can be accomplished using cin and cout as well as the operators << and >>.
-
These are all defined in the header file iostream.
Thus one has to include the following preprocessor directive:
#include <iostream>
-
The syntax for using cout is:
cout << Variable_name;
This displays the value stored in the variable "Variable_name" onto the screen.
-
Multiple output to the screen can be chained together:
cout << Variable1 << Variable2 << Variable3 ;
Notice there is no spaces appear between these 3 values.