COMPUTER PROGRAMMING FUNDAMENTALS
5 BASIC ELEMENTS OF PROGRAMMING
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
|
cin»
|
|
cin«
|
|
<cin>
|
|
None of the above
|
Detailed explanation-1: -Thus, cin means “character input". The C++ cin object belongs to the istream class. It accepts input from a standard input device, such as a keyboard, and is linked to stdin, the regular C input source.
Detailed explanation-2: -The usage of cin is simple, too, and as cin is used for input, it is accompanied by the variable you want to be storing the input data in: std::cin » Variable; Thus, cin is followed by the extraction operator » (extracts data from the input stream), which is followed by the variable where the data needs to be stored.
Detailed explanation-3: -Also, the operator whose use takes place to take the input is called the extraction or get from operator (»), while the operator that is used for displaying the output is called the insertion or put to operator («).
Detailed explanation-4: -cin uses the insertion operator( » ) while cout uses the extraction operator( « ).