0
What is meant by cout in c++?
2 Respuestas
+ 1
The identifier cout stands for Common OUTput. cout is a predefined variable in C++ that indicates you are going to output a stream of characters to an output device. cout uses an operator called the insertion operator (<<)
0
On most program environments, the standard output by default is the screen, and the C++ stream object defined to access it is cout.
For formatted output operations, cout is used together with the insertion operator, which is written as << (i.e., two "less than" signs).
The << operator inserts the data that follows it into the stream that precedes it. In the examples above, it inserted the literal string Output sentence, the number 120, and the value of variable x into the standard output stream cout. Notice that the sentence in the first statement is enclosed in double quotes (") because it is a string literal, while in the last one, x is not. The double quoting is what makes the difference; when the text is enclosed between them, the text is printed literally; when they are not, the text is interpreted as the identifier of a variable, and its value is printed instead.