+ 3

Why do we use >> for cout for ex: cout<< and cin>> ? Why cant we use as cout>> and cin<<

2nd Mar 2017, 3:57 PM
yasthika thirupathy
yasthika thirupathy - avatar
3 Respostas
+ 9
Good Question! << is called insertion operator and >> is called extraction operator. See the direction of the arrows. cout << "yo"; means insert "yo" to output (screen). cin >> num; means extract value of num from input.
2nd Mar 2017, 4:24 PM
Vishal++
Vishal++ - avatar
+ 4
its designed by the designer of the language. its the syntax which can't be changed
9th Nov 2017, 6:55 PM
Prasad K G
Prasad K G - avatar
+ 2
Simply saying..,it's a syntax, we can't customize it.
2nd Mar 2017, 6:27 PM
Ashish Dhaka
Ashish Dhaka - avatar