What is the difference between the cout and cin iostream
objects?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is visual c++ redistributable?

588


hello sir i need movie editing and mixing software .where it is available and what is the site address

1730


Is it ok to uninstall microsoft visual c++?

598


Do I need microsoft visual c++ on my computer?

592


What is visual c++ 2008 redistributable x64?

558






What is microsoft visual c++ 2005 redistributable?

587


How do I create an mfc application in vc++?

620


Explain pointer to the constant and constant pointer? Explain difference between them.

691


Explain some of commonly used methods provided by iunknown.

517


Is visual c++ a compiler?

558


What is a microsoft visual c++ 2008 redistributable?

540


Explain the advantages of cwinthread class.

604


What is microsoft visual c++ 2013 redistributable package x64?

552


What is ole? How do you handle drag and drop in ole?

556


What is the Use of the Developer Studio Editor?

2163