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: 
`\r` returns the cursor to the beginning of the line, NOT to the next line. When you use `\n`in Linux, `\r` is implied, in windows, it is not.

Using `\r` in Unix-like systems may result in overwriting the same line.
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.