0

'cin' is confusing me with 'cout' can somebody explain me about 'cin' ? Thanks !😃

cin?

22nd Sep 2016, 6:02 AM
Asad Tanoli
Asad Tanoli - avatar
2 odpowiedzi
+ 4
c"out" is when you "out"put something to the screen whereas c"in" is when you "in"put something. The syntax is also different: cout << "this is the cout syntax"; in this case << is called the stream insertion operation, this is because you are inserting some data into cout which outputs that data to the screen. cin >> x; here the >> is called the stream extraction operation. As you can guess it extracts the information from cin and stores it in the variable x.
22nd Sep 2016, 8:03 AM
Emad Rahman
Emad Rahman - avatar
0
Thanks Emad ! this answers my question ! :) Helpful !
22nd Sep 2016, 9:57 AM
Asad Tanoli
Asad Tanoli - avatar