new line problem

i want to ,what is the difference between \n and \r .how and when they are used??
for windows they are same I suppose other than there ascii codes.
Topic archived. No new replies allowed.