Question: > 
> **Possible Duplicate:**  
> 
> [What is the difference between \r and \n?](https://stackoverflow.com/questions/1279779/what-is-the-difference-between-r-and-n) 
> 
> 
> 

Hi,

What is difference between `\n` (newline) and `\r` (carriage return)? They both move current cursor to the next line. Are they same?

Answer: 
Actually, a carriage return is supposed to move the cursor to the beginning of the current line. Then, newline moves the cursor exactly down one.

Nowadays, compilers will often automatically convert one or the other to `\r\n` on Windows or `\n` on Linux. Mac used to use \r but they have changed to the \n convention.

*(edit: removed false/untested statements)*
Read [The Great Newline Schism](http://www.codinghorror.com/blog/2010/01/the-great-newline-schism.html) it explains everything in deep detail with great humor.