الجمعة، 19 فبراير 2016

cin and the Extraction Operator >>

<<cin 

•The syntax of an input statement using cin and the extraction operator >> is:
cin >> variable 1>>variable2;
 
•The extraction operator >> is binary
−Left-side operand is an input stream variable
•Example: cin
−Right-side operand is a variable

•No difference between a single cin with multiple variables and multiple cin statements with one variable
•When scanning, >> skips all whitespace
−Blanks and certain nonprintable characters
>> distinguishes between character 2 and number 2 by the right-side operand of >>
−If type char or int (or double), the 2 is treated as a character or as a number 2






ليست هناك تعليقات:

إرسال تعليق