What is d difference between << and>> ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is d difference between << and>> ?

20th Sep 2016, 12:16 PM
Karan Shirur
Karan Shirur - avatar
2 Answers
+ 2
Think them as the flow of the value, think them as simple arrow signs. When you write cout << foo, that means "monitor << variable" And when you type cin >> bar, it means "variable from keyboard >> your program".
20th Sep 2016, 12:17 PM
Abrar Borno
Abrar Borno - avatar
+ 2
The >> arrow points inside so you can think of it as input arrow the << arrow points outwards therefore the output from a computer
20th Sep 2016, 12:22 PM
Harmony Moyo
Harmony Moyo - avatar