answersLogoWhite

0

std::endl means end line, and is typically used to insert a new-line character in an output stream using the insertion operator (<<). This is really no different to inserting the '\n' character code to the output stream, however it also serves to flush the output buffer by writing all unwritten characters to the output stream.

When used as a global function, std:endl(ostream& OS) can be used to insert a new-line character and flush the given output stream. The return value is a reference to the output stream itself thus it can be used in compound statements that make use of the return value.

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

What is the name of the 'endl' operator in c plus plus and its purpose?

endl is not an operator. Is is a stream manipulator. It inserts and end-of-line into the stream. cout &lt;&lt; "This is a test" &lt;&lt; endl &lt;&lt; "This is also a test" &lt;&lt; endl; Gives you ... This is a test This is also a test


What is the syntax of printing a value in c plus plus?

std::cout&lt;&lt;42&lt;&lt;std::endl;


Function in C plus plus that takes in any number parameter and returns the string representation of it?

#include#includeusing std::cin;using std::cout;using std::endl;using std::string;int main(){string number = "0";cout number;cout


What are the steps in c plus plus program to print word computer?

std::cout&lt;&lt;"computer"&lt;&lt;std::endl;


What are the building function in c plus plus?

There is no such term as "building function" in C++.


How to Write a c plus plus program to print number from 1 to 500?

#include using std::cout;using std::endl;int main(viod){cout


C plus plus program using for loop that prints all even numbers between and including 10 and 1000?

#include using std::cout;using std::endl;int main(){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; } } }


What is meant by 'static' in C plus plus?

Static in C/C++ means that the variable will keep its value across calls to the function. ex: func() { static int x=0; ++x; cout &lt;&lt; x &lt;&lt; endl; } main() { func(); func(); func(); } This will print: 1 2 3 *NOT* 1 1 1


Example of Borland c plus plus program?

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


How do you write a counter program to count from 1 to 100 in C plus plus?

for(int i=1; i&lt;=100; ++i ) std::cout &lt;&lt; i &lt;&lt; std::endl;


How do you write a programme to print a plus bi in c plus plus?

#include &lt;iostream&gt; int main() { std::cout &lt;&lt; "a plus bi" &lt;&lt; std::endl; return 0; }