what's the difference between endl ,\n and \n\n? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what's the difference between endl ,\n and \n\n?

18th Sep 2019, 6:13 PM
Yusof
Yusof - avatar
1 Answer
+ 2
Printing endl and '\n' are basically the same though endl will certainly flush the output (write the buffer it to stdout). "\n\n" is the same as twice endl or twice '\n'.
18th Sep 2019, 6:24 PM
Aaron Eberhardt
Aaron Eberhardt - avatar