what is cin | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

what is cin

17th Jun 2017, 2:46 PM
oishi
2 Respostas
+ 3
hi, The predefined objectĀ cinĀ is an instance ofĀ istreamĀ class. The cin object is said to be attached to the standard input device, which usually is the keyboard. TheĀ cinĀ is used in conjunction with the stream extraction operator, which is written as >> which are two greater than signs as shown in the below example. #include <iostream> using namespace std; int main( ) { char name[50]; cout << "Please enter your name: "; cin >> name; cout << "Your name is: " << name << endl; } when this code executed it will ask name then it will print the name.
17th Jun 2017, 2:52 PM
Nanda Balakrishnan
+ 1
cout << // cin >> cout is an OUTput for your app cin is an INput. Ex : int userInput; cin >> userInput; cout << userInput; //invites the user to select a number and show it
17th Jun 2017, 2:49 PM
coutable.n
coutable.n - avatar