0
What is endl
tell me
5 Respostas
+ 2
its used to end an line. (and start an new one)
+ 2
cout<<endl≤<"1";
generates a new line I.e. ends the current line and the followed thing is outputted in next line.
It is nearly equivalent to cout<<"\n";.
for exact
std::cout << '\n' << std::flush;
+ 1
It's a value that tells cout object to start new line. Treat it as a shortcut for endline
0
endl => end line
or a more simple declaration - its a line break.
cout << "Hello ";
cout << "Wordl";
// Output => Hello World
cout << "Hello " << endl;
cout << "Wordl";
// Output => Hello
// World
0
endl is used to end a line end=end and l=line
so endline..
it moves pointer to next line
like we press enter in notepad it goes to next line.