Good Answer: Does Windows carriage return \r\n consist of two characters or one character?

Recently I’ve earned silver badge:  Good Answer

This badge is awarded answers which have score of 25 or more. And my answer to question Does Windows carriage return \r\n consist of two characters or one character? has reached 25 upvotes.

Here’s my answer:

These are two characters:

  • \r is carriage return;
  • \n is line feed.

Two characters combined represent a new line on Windows. Whereas on Linux, \n represents new line. It moves cursor to the start of new line on Linux. On Windows, the cursor will stay at the same column in the console but on the next line.

\r on Linux has the same effect as on Windows: moves cursor to the start of the line. It is possible to print different information on the same line where \r is used instead of \n.

Reputation 5050

On March 11, 2013, my reputation at Stack Overflow reached 5 thousand. This week it became 5,050:

Stack Overflow flair with 5,050 reputation

It was gratifying that latest upvotes were to old answers from 2011.

While I was planning to write this post, my two answers brought in addition +20 points to reputation. So at the moment of this writing, my reputation is 5,070.

Up to now, I’ve earned at Stack Overflow:

  • 2 gold badges,
  • 6 silver badges,
  • 21 bronze badges.