cout

  1. In C++, the standard input is from the keyboard, and the standard output is to the screen.

  2. Standard input/output (I/O) can be accomplished using cin and cout as well as the operators << and >>.

  3. These are all defined in the header file iostream. Thus one has to include the following preprocessor directive:

    #include <iostream>

  4. The syntax for using cout is:

    cout << Variable_name;

    This displays the value stored in the variable "Variable_name" onto the screen.

  5. Multiple output to the screen can be chained together:

    cout << Variable_1 << Variable_2 << ... ;