hi friends,
whats diffrence between newline character and carriage return character?
Printable View
hi friends,
whats diffrence between newline character and carriage return character?
They have different ASCII codes,
different OS use one or both of these symbols to indicate new line in the text file
I remember there was some usefull post not very long time ago about text-file formats and differences on different OSes... You can try to serch forum for this post...
Ahhh, here it is http://cboard.cprogramming.com/showt...ght=typewriter
Look for the post of Cat
To be exact: http://cboard.cprogramming.com/showp...02&postcount=3 (Clicking on the small #3 in the top-right corner of the post gives you that.)
BTW, you can print a newline character with '\n' and a carriage return with '\r'.