And what is endl for? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

And what is endl for?

4th Feb 2018, 8:49 PM
Daniel Gonzalez
Daniel Gonzalez - avatar
2 Answers
+ 3
In C++, endl is used to specify a newline in a string, similar to \n and <br>. For example, if you wanted to print 2 different strings on different lines, you would do the following: cout << "Solo" << endl; cout << "Learn" << endl; /*Output- Solo Learn */
4th Feb 2018, 8:51 PM
Faisal
Faisal - avatar
0
we use the condition.. like while to define a condition
5th Feb 2018, 12:27 PM
Yash Sangolkar
Yash Sangolkar - avatar