+ 1
What's the difference between \n and endl?
They do the same thing, so what is what I wonder š¤ https://code.sololearn.com/c8eGh9J39t16/?ref=app
9 Answers
+ 4
https://www.geeksforgeeks.org/endl-vs-n-in-cpp/
+ 3
Both are using for next line, but in c++ mostly use endl. And \n we can use this in many languages such as c, c++, python e.t.c
+ 1
Another question if anyone can see this. Please search: How to play Coach Challenge. Tags are: Cout, Play, Coach, Challenge, game, Question ....
+ 1
endl can be used in double 'for', but it doesn't work with \n, I would suggest using \n.
+ 1
same. though in my experience on competitive programming, "\n" is faster in outputting than endl.
+ 1
Interesting. Thanks this is informative. If the is extra info that hasn't been shared please teach me lots.
0
I like studying something using different sources, to get a deeper understanding of it. Learning is fun. Coding is Fun.