answersLogoWhite

0

What is Cin and Cout?

Updated: 12/20/2022
User Avatar

Moymoy101591

Lvl 1
14y ago

Best Answer

The cin and cout objects are iostream objects somewhat equivalent to stdin and stdout.

The equivalent of printf ("Hello World\n"); is cout << "Hello World" << endl;

The equivalent of scanf ("%d", &i); is cin >> i;

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is Cin and Cout?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Why cin and cout are not consider as keywords?

cin and cout are iostream objects, not keywords.


Develop a mark sheet in C plus plus for the university examination by using any form of constructors?

#include&lt;iostream.h&gt; class student { char name[10]; int rollno; public: void get() { cout&lt;&lt;"enter student's name"&lt;&lt;endl; cin&gt;&gt;name; cout&lt;&lt;"enter student's rollno"&lt;&lt;endl; cin&gt;&gt;rollno; } void disp() { cout&lt;&lt;"Name of the student is : "&lt;&lt;name&lt;&lt;endl; cout&lt;&lt;"Rollno is : "&lt;&lt;rollno&lt;&lt;endl; } }; class marks:public student { char subjectname[15]; int subcode,intmarks,extmarks; public: void get() { student::get(); cout&lt;&lt;"enter subject name"; cin&gt;&gt;subjectname; cout&lt;&lt;"enter subject code"; cin&gt;&gt;subcode; cout&lt;&lt;"enter Internal marks"; cin&gt;&gt;intmarks; cout&lt;&lt;"enter External marks"; cin&gt;&gt;extmarks; } void disp() { student::disp(); cout&lt;&lt;"Subject name is : "&lt;&lt;subjectname&lt;&lt;endl; cout&lt;&lt;"Subject code is : "&lt;&lt;subcode&lt;&lt;endl; cout&lt;&lt;"Internal marks : "&lt;&lt;intmarks&lt;&lt;endl; cout&lt;&lt;"External marks : "&lt;&lt;extmarks&lt;&lt;endl; } }; void main() { marks m; m.get(); m.disp(); }


Write a program to enter a character and it will tell the character etered?

{char a;...cout > a;cout


Can cin and cout be used in the function definition of user defined functions in C plus plus?

The cin and cout entities (they are not statements) are C++ iostream library objects that allows access to "standard input" and "standard output". In C++, the statement cout > variable; allows reading from standard input to a variable.


How C code for subtract two parameters?

#include using std::cin;using std::cout;using std::endl;int main(){double firstNumber(0);cout firstNumber;double secondNumber(0);cout secondNumber;cout

Related questions

Why cin and cout are not consider as keywords?

cin and cout are iostream objects, not keywords.


What is the function of the cin and cout statements?

cin and cout are synonymous with stdin and stdout, implementing console input and output respectively.


How you can use two input in a single statement in c plus plus?

cout&lt;&lt;"______": cin &gt;&gt;__&gt;&gt;__; [example cout&lt;&lt;"enter no."; cin&gt;&gt;a&gt;&gt;b; ]


Program in c plus plus that accepts 10 input integer and to get the Greatest common divisor?

#include&lt;iostream&gt; using namespace std; int gcf(int a, int b) { int t; while(b!=0) { t = b; b = a%b; a = t; } return a; } int main() { int a,b,c,d,e,f,g,h,i,j,k; cout&lt;&lt;"Enter 1st numbers: "; cin&gt;&gt;a; cout&lt;&lt;"Enter 2nd numbers: "; cin&gt;&gt;b; cout&lt;&lt;"Enter 3rd numbers: "; cin&gt;&gt;c; cout&lt;&lt;"Enter 4th numbers: "; cin&gt;&gt;d; cout&lt;&lt;"Enter 5th numbers: "; cin&gt;&gt;e; cout&lt;&lt;"Enter 6th numbers: "; cin&gt;&gt;f; cout&lt;&lt;"Enter 7th numbers: "; cin&gt;&gt;g; cout&lt;&lt;"Enter 8th numbers: "; cin&gt;&gt;h; cout&lt;&lt;"Enter 9th numbers: "; cin&gt;&gt;i; cout&lt;&lt;"Enter 10th numbers: "; cin&gt;&gt;j; k=gcf((((((((gcf(a,b),c),d),e),f),g),h),i),j); cout&lt;&lt;"The GCD of the 10 numbers is: "&lt;&lt;k&lt;&lt;endl; system("pause"); return 0; }


How do you write a program in C plus plus to find volumn of a cuboid?

#include&lt;iostream.h&gt; void main() { int l,b,h,v; cout&lt;&lt;"Enter length "; cin&gt;&gt;l; cout&lt;&lt;"Enter breadth "; cin&gt;&gt;b; cout&lt;&lt;"Enter Height "; cin&gt;&gt;h; v=l*b*h; cout&lt;&lt;"Volume is "&lt;&lt;v; }


1 Write a C plus plus program to read two integers and display them Use cin and cout statements?

#include &lt;iostream&gt; using namespace std; int main() { int x,y; cout&lt;&lt;"please, enter the 1st value : "; cin&gt;&gt;x; cout&lt;&lt;"please, enter the 2nd value : "; cin&gt;&gt;y; cout&lt;&lt;endl; cout&lt;&lt;"the first value is : "&lt;&lt;x&lt;&lt;endl; cout&lt;&lt;"the second value is : "&lt;&lt;y&lt;&lt;endl; return 0; }


How do you make a calculator using switch statement?

In C++: #include &lt;iostream&gt; using namespace std; int main() { int x, y; char func; cout &lt;&lt; "Enter a number: "; cin &gt;&gt; x; cout &lt;&lt; "Choose Function: "; cin &gt;&gt; func; cout &lt;&lt; "Enter another number: "; cin &gt;&gt; y; switch(func) { case '+': cout &lt;&lt; x + y &lt;&lt; endl; break; case '-': cout &lt;&lt; x - y &lt;&lt; endl; break; case '*': cout &lt;&lt; x * y &lt;&lt; endl; break; case '/': cout &lt;&lt; x / y &lt;&lt; endl; break; default: cout &lt;&lt; "Invalid Function!" &lt;&lt; endl; break; } char wait; cin &gt;&gt; wait; return 0; }


Develop a mark sheet in C plus plus for the university examination by using any form of constructors?

#include&lt;iostream.h&gt; class student { char name[10]; int rollno; public: void get() { cout&lt;&lt;"enter student's name"&lt;&lt;endl; cin&gt;&gt;name; cout&lt;&lt;"enter student's rollno"&lt;&lt;endl; cin&gt;&gt;rollno; } void disp() { cout&lt;&lt;"Name of the student is : "&lt;&lt;name&lt;&lt;endl; cout&lt;&lt;"Rollno is : "&lt;&lt;rollno&lt;&lt;endl; } }; class marks:public student { char subjectname[15]; int subcode,intmarks,extmarks; public: void get() { student::get(); cout&lt;&lt;"enter subject name"; cin&gt;&gt;subjectname; cout&lt;&lt;"enter subject code"; cin&gt;&gt;subcode; cout&lt;&lt;"enter Internal marks"; cin&gt;&gt;intmarks; cout&lt;&lt;"enter External marks"; cin&gt;&gt;extmarks; } void disp() { student::disp(); cout&lt;&lt;"Subject name is : "&lt;&lt;subjectname&lt;&lt;endl; cout&lt;&lt;"Subject code is : "&lt;&lt;subcode&lt;&lt;endl; cout&lt;&lt;"Internal marks : "&lt;&lt;intmarks&lt;&lt;endl; cout&lt;&lt;"External marks : "&lt;&lt;extmarks&lt;&lt;endl; } }; void main() { marks m; m.get(); m.disp(); }


Develop a program in C plus plus to prepare mark sheet of an university examination?

#include #include #include class student { int roll; char name[25]; char add [25]; char *city; public: student() { coutname; cout>sub3; } void output() { putdata(); cout


Marksheet of 5 student using c pro?

#include #include #include class student { int roll; char name[25]; char add [25]; char *city; public: student() { coutname; cout>sub3; } void output() { putdata(); cout


Write a program to enter a character and it will tell the character etered?

{char a;...cout > a;cout


Can cin and cout be used in the function definition of user defined functions in C plus plus?

The cin and cout entities (they are not statements) are C++ iostream library objects that allows access to "standard input" and "standard output". In C++, the statement cout > variable; allows reading from standard input to a variable.