Last updated on June 13th, 2020 at 08:35 pm
#include<iostream>:This is a directive which causes the preprocessor to add the contents of iostream, which is a header file and must be added above all of a program where input/output statements has been used. We will include the header file with the statement
The iostream package automatically defines a variable (an object) called cout that accepts all data bound for standard output. To send data to standard output, we use the operator <<. In C it was “bitwise left shift,”. But C++ allows operators to be overloaded and here in iostream , the operator << means “send to” For example:
sends the string “TANMAY” to the object called cout, which is short for “console output”. Then using the cout object of the header file iostream the text is displayed on the screen.