answersLogoWhite

0

Define Cout in Visual C

User Avatar

Anonymous

17y ago
Updated: 8/16/2019

Cout is actually a statement used for outputting strings, the values of variables, and anyother thing that you want to be displayed on the screen. following is the syntax of cout statement. cout<<"String"; cout<<variable/arrays/structure variables; Note: / means that you can use any one of them. cout<<variable1<<variable2<<variable3; cout<<"string 1"<<varibale1<<"string 2"; note: we can use any combination of variables and strings we want. The << operator takes value from the variable and transfer it to cout which sends it to the output device normally the monitor using a stream called the output stream. Thanx, Ghulam Nasir(Khan) NIIT Cout is actually a statement used for outputting strings, the values of variables, and anyother thing that you want to be displayed on the screen. following is the syntax of cout statement. cout<<"String"; cout<<variable/arrays/structure variables; Note: / means that you can use any one of them. cout<<variable1<<variable2<<variable3; cout<<"string 1"<<varibale1<<"string 2"; note: we can use any combination of variables and strings we want. The << operator takes value from the variable and transfer it to cout which sends it to the output device normally the monitor using a stream called the output stream. Thanx, Ghulam Nasir(Khan) NIIT

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

Define functions in c?

type function_name (type1 arg,...){//function body}void finc(int arg0){cout


Write algorithm to find middle number in three numbers?

#include&lt;iostream.h&gt; #include&lt;conio.h&gt; void main() { int a,b,c; cout&lt;&lt;"enter the value of a"&lt;&lt;endl; cin&gt;&gt;a; cout&lt;&lt;"enter the value of b"&lt;&lt;endl; cin&gt;&gt;b; cout&lt;&lt;"enter the value of c"&lt;&lt;endl; cin&gt;&gt;c; if(a&gt;b) { if(b&gt;c) { cout&lt;&lt;"the middle number is b:"&lt;&lt;endl; } else { if(a&gt;c) { cout&lt;&lt;"the middle is c:"&lt;&lt;endl; } else { cout&lt;&lt;"the middle number is b:"&lt;&lt;endl; } } if(a&lt;b) { if(b&lt;c) { cout&lt;&lt;"the middle number is b:"&lt;&lt;endl; } else { if(a&lt;c) { cout&lt;&lt;"the middle number is c:"&lt;&lt;endl; } else { cout&lt;&lt;"the middle number is a:"&lt;&lt;endl; } } }


Give the simple demo of Visual C plus plus?

#include&lt;iostream&gt; int main() { std::cout &lt;&lt; "Hello world!" &lt;&lt; std::endl; }


What is the definition of cout?

COUT is an inbuilt function in c++ language. Cout is used to print something on to the standard output.


Two numbers are input through the keyboard into two locations C and D write a program in c to interchange the contents of C and D?

#include&lt;iostream.h&gt; main() { int C,D,E; cout&lt;&lt;"Number at location C="; cin&gt;&gt;C; cout&lt;&lt;"Number at location D="; cin&gt;&gt;D; E=C; C=D; D=E; cout&lt;&lt;"New Number At Location C="&lt;&lt;C&lt;&lt;endl; cout&lt;&lt;"New Number At Location D="&lt;&lt;D&lt;&lt;endl; }


Write a program to print grade of a student in C?

#include&lt;iostream.h&gt; #include&lt;conio.h&gt; void main() { clrscr(); int marks; cout&lt;&lt;"Enter Marks of Student="; cin&gt;&gt;marks; cout&lt;&lt;"Grade\n"; if(marks&gt;0 &amp;&amp; marks&lt;50) cout&lt;&lt;"F"; else if(marks&gt;=50 &amp;&amp; marks&lt;55) cout&lt;&lt;"C-"; else if(marks&gt;=55 &amp;&amp; marks&lt;60) cout&lt;&lt;"C"; else if(marks&gt;=60 &amp;&amp; marks&lt;65) cout&lt;&lt;"c+"; else of(marks&gt;=65 &amp;&amp; marks&lt;69) cout&lt;&lt;"B-"; else if(marks&gt;=69 &amp;&amp; marks&lt;71) cout&lt;&lt;"B"; else if(marks&gt;=71 &amp;&amp; marks&lt;75) cout&lt;&lt;"B+"; else if(marks&gt;=75 &amp;&amp; marks&lt;79) cout&lt;&lt;"B"; else if(marks&gt;=79 &amp;&amp; marks&lt;84) cout&lt;&lt;"A"; else cout&lt;&lt;"A"; getch(); }


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.


Program to generate a pattern a aba abcba?

#include&lt;iostream.h&gt; void main() { cout&lt;&lt;' '&lt;&lt;' '&lt;&lt;"a"&lt;&lt;'\n'; cout&lt;&lt;' '&lt;&lt;"a"&lt;&lt;"b"&lt;&lt;"a"&lt;&lt;'\n'; cout&lt;&lt;'a'&lt;&lt;'b'&lt;&lt;'c'&lt;&lt;'b'&lt;&lt;'a'&lt;&lt;"\n"; }


C program to find maximum of three nos without using loops?

I am a student of class 10. I doesn't know C Language but I can tell such a program in C++ Language.... //------------------------------------ #include &lt;iostream.h&gt; #include &lt;conio.h&gt; void main() { int a,b,c,m; clrscr(); cout&lt;&lt;"Enter First Number: "; cin&gt;&gt;a; cout&lt;&lt;"Enter Second Number: "; cin&gt;&gt;b; if (a&lt;b) m=a; if (a&gt;b) m=b; cout&lt;&lt;"Enter Third Number: "; cin&gt;&gt;c; if (c&lt;m) cout&lt;&lt;"The Largest Number is "&lt;&lt;m; else cout&lt;&lt;"The Largest Number is "&lt;&lt;c; getch(); }


What is c out?

most basicaly if I tell, cout is the printing statement in c++. cout&lt;&lt;"Hello world"; The above statement will print the sentence "hello wold". with the expression cout &lt;&lt;variable, the contents of variable is printed to the standard output. int variable=10; cout&lt;&lt;variable; The o/p will be 10..... Hope this will help u.... :)


How do you make a C plus plus program that arrange the the numbers in ascending order?

Heres something i whipped up in a hurry... This uses the Bubble Sort method found (related links) #include &lt;iostream&gt; using namespace std; int main(int argc, const char* argv) { int arraysize = 5; //Unsorted array size int array [] = { 5, 3, 4, 2, 1 }; //The array of numbers itself //Display the unsorted array cout &lt;&lt; "Before: {"; for (int c=0; c &lt;= arraysize; c++) { cout &lt;&lt; array[c]; if (c != arraysize) { cout &lt;&lt; ","; } } cout &lt;&lt; "}" &lt;&lt; endl; //Acctually sort the array int tmp=0; //Used for swaping values for (int loop=0; loop &lt;= (arraysize - 1); loop++) { for (int c=0; c &lt;= (arraysize - 1); c++) //The sort loop { if (array[c] &gt; array[c + 1]) { //Swaps the two values in the array tmp = array[c]; array[c] = array[c + 1]; array[c + 1] = tmp; //Cleanup tmp = 0; } } } //Display the sorted array cout &lt;&lt; "After: {"; for (int c=0; c &lt;= arraysize; c++) { cout &lt;&lt; array[c]; if (c != arraysize) { cout &lt;&lt; ","; } } cout &lt;&lt; "}" &lt;&lt; endl; return 0; }


What is the Logic to print the letters from A to Z without using printf in Turbo C plus plus?

#include&lt;iostream&gt; int main() { using namespace std; char c='A'; do { cout&lt;&lt;c; }while(c++&lt;'Z'); cout&lt;&lt;endl; }