C++ input output functions
C++ Input Operator:
cin>> value;
It is an input statement and causes the program to wait for the user to type in a number. The number is placed in the variable value. The identifier cin is a predefined object in c++ that corresponds to the standard input stream.
The operator >>
is known as extraction. It extracts the value from the keyboard and assigns it to the variable on its right.
C++ Output Operator:
cout<< "Hello World";
This statement introduces two new C++ features – cout and <<. The identifier cout is a predefined object that represents the standard output stream in C++. standard output stream represents the screen.
The operator <<
is known as insertion. It inserts or sends the contents of the variable on its right to the object on its left.