How are \\r and \\n different? I think it has something to do with Unix vs. Windows vs. Mac, but I\'m not sure exactly how they\'re different, and
\\r
\\n
\r is used to point to the start of a line and can replace the text from there, e.g.
\r
main() { printf("\nab"); printf("\bsi"); printf("\rha"); }
Produces this output:
hai
\n is for new line.
\n