+ 1
what is the use of cout? and cin??? when and where these are used
7 Answers
+ 7
COUT is for displaying characters. Example: cout<<"hi";
CIN is for inputting a value/character. Example: cin>>;
Example Program:
{
int x;
cout<<"Please Input Your Age: ";
cin>>x;
cout<<"Your Age is: "<<x<<endl;
return 0;
}
+ 3
cin is standart input stream, cout is standart output stream. I think, it is enough to understand this.
+ 3
that's used for printing and input of values
+ 3
cout is used to display .any values which is given by that variable followed by the insertion operator << it is used inside the function
+ 1
can we use anything else in place of this??
0
@ Mayur Thakur
printf ,scanf are used in c# & not in c+
0
Cout is to read the sentence and cin is to display