A carriage return (\r) makes the cursor jump to the first column (begin of the line) while the newline (\n) jumps to the next line and might also to the beginning of that line. Jan 6, 2016 · What’s the difference between \n (newline) and \r (carriage return)? In particular, are there any practical differences between \n and \r? Are there places where one should be used.

Recommended for you

You may also like