Can anyone explain me difference between \n and \r?
\n is a newline and \r is carriage return
\n will move to the next line. eg. hitting the enter key. \r carriage return means it will move to the beginning of the line you are currently on, and not create a new line. eg. hitting the home key.