What Does cout<< in C++ Do? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What Does cout<< in C++ Do?

C++

26th Nov 2016, 4:30 AM
ERFIRE
ERFIRE - avatar
4 Answers
+ 4
it print your data to console. if you are talking about cout.
26th Nov 2016, 4:34 AM
Aditya kumar pandey
Aditya kumar pandey - avatar
+ 2
c out = Console Output. Utilized to write output to the console. cout is an object found in iostream. Code: int number = 1000000000; cout << "Varun is " << number << " millenia old." << endl; I first inject "Varun is " into cout. Then, I inject number. Next, I inject " millenia old." Finally, I inject endl, which prints a newline. The semicolon ends the statement. This would write "Varun is 1000000000 years old." to the console.
26th Nov 2016, 5:57 AM
Varun Ramani
Varun Ramani - avatar
+ 1
Okay
26th Nov 2016, 4:35 AM
ERFIRE
ERFIRE - avatar
+ 1
cout is used to print the data on the screen.. example. cout<<"hello"; //output : hello Hello will print on the screen. Assignment operator << is used to assign the value to cout and it will print on the screen. Happy codding
4th Dec 2016, 6:18 AM
Anil Krishna Raj
Anil Krishna Raj - avatar