+ 7
Why we use << for cout and>> for cin..??
12 odpowiedzi
+ 10
M.MANIVANNAN for c++, output and input is done using stream with help of global object cin and cout ...
<< and >> are operators.. for cout object; << operator is overloaded to display output..for cout, >> operator is not overloaded. so, when you use cout >>, you get error.. same goes with cin and >>.
this is what c++ io has been implemented...
in case of your own custom class, you can overload << or >> operator for any purpose you want...
+ 4
its the insertion and excrtion operter use to input and output the value on the consloe
+ 3
In cout gives the output and in cin we have to input
+ 3
there is no particular reason for this bt they are operator... <<insertion operator bcz it is headed toward front it is used to print and >>extraction it is head back to take input just the logic.. well you can make ur own
+ 2
When ever you want to use output and input, you use << and >> respectively. it doesn't have to be cout <<, it can be something like this <<
+ 2
They are stream input/output (extraction/insertion) operators. Agree with Sergey Ushakov that the symbols << and >> show direction of input/output. For standard out/in I believe the format is "cout << str", "cin >> str".
+ 2
Monic You right. Of course it was cout.
+ 2
Cout is Console out.
0
The operators shows direction of stream. When you print "cout << str" it looks like you move str into cout.
0
plz tell me answer this question
1 2 3
1 2
1
0
its the insertion and excrtion operter use to input and output the value on the consloe
0
Shadhab lappe is right