What is the difference between the cout and cin iostream
objects?
Answers were Sorted based on User's Feedback
Answer / satyagmk
cin is for reading the data.
cout if for print/display the result at the output.
| Is This Answer Correct ? | 52 Yes | 5 No |
Answer / udit bali
1. cin is used to get data from the user and on other hand cout is used to print the data on the screen for the display.
2. cout and cin both are used under iosteam library.
3. cin operator is ">>" and cout operator is "<<"
| Is This Answer Correct ? | 35 Yes | 8 No |
Answer / farkhanda
cin and cout both are used in iostream library
cin is same as "scanf" in C and cout is same as "printf" in C
cin operator is always ">>"
and
cout operator is always "<<"
the general syntax for cout is .... cout<<variable<<variable2<<....<<variable n;
the general syntax for cin is ....
cin>>variable1>>variable2>>.....>>variable n;
| Is This Answer Correct ? | 19 Yes | 6 No |
Answer / muhammad haroon
Cin stand console input and cout stand for console output.
Cin get data from user at compile time and cout display the data on computer screen .
These are predefined in c++
Cin operator is >> and cout operator is<<.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / mukta b
• Cin : Represented by insertion operator >>
Cout : Represented by extraction operator <<
• cin : is an object of input streams like consoles, files, etc.
Cout : is an object of output streams that's used to show outputs.
• cin : is an input statement
cout : is an output statement
Example :
#include<iostream.h>
#include<conio.h>
void main()
{
int a;
cout<<"Enter value for a: "; //taking value of a
cin>>a; //inputing value
cout<<"A = "<<a; //outputing value
getch();
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / osama ilahi
cin called stream extraction and cin means to in input the information .
cout callled stream insertion and cout means to output information.
| Is This Answer Correct ? | 1 Yes | 1 No |
Answer / arfa mumtaz
The cout is pronounced as see out
The cin is pronounced as see in
| Is This Answer Correct ? | 1 Yes | 9 No |
Suppose multiple threads accessing a registry key at a time. In that case which synchronization object you will use?
How do you handle drag and drop in ole?
What is the difference between the client and non-client areas?
What is vc++ programming?
How can we allow no selection of radio button in grouped radio buttons?
A file a.cpp & B.cpp are complied & linked together in VC++ file a is something like int a =100;, File B is something like extern a; main() { printf("%d",a); }what will be the output.a)100,b)linker error,c)complier error etc etc.
What is the difference between the cout and cin iostream objects?
What Is Your Greatest Weakness?
4 Answers Apple, Infosys, IOCL, Servion, TCS, VisionTek,
Where can I find microsoft visual c++ on my computer?
Differences between vc 6.0 and vc 7.0
Can I uninstall visual c++?
What is the Use of the Developer Studio Editor?