What is the difference between line feed and carriage return?

Answer:

Line Feed '\n' takes the cursor to newline but does not take it to the beginning. Wheareas the Carriage Return '\r' does just the opposite. The combination '\r\n' is used as EOF (End Of File).

Note: Mac uses '\r' for Newline whereas Unix use '\n'.

First answer by ID2098299410. Last edit by ID2098299410. Question popularity: 1 [recommend question].