title: Why does char 0xA change to 0xD + 0xA characters when writing it into a file with a console?
body: <p>I used
  <code>std::cout &lt;&lt; (char)0xA</code>
  in my C++ code.<br>
  Then, I wrote to the console <code>myProgram.exe &gt; file.txt</code>.<br>
  Next, I opened <code>file.txt</code> with A HEX editor and I found <code>0D 0A</code> instead of <code>0A</code>.</p>
  <p>IDK why this happened. Please, help.</p>
  <p><a href="https://i.stack.imgur.com/DM8Ap.png" rel="nofollow noreferrer">HEX Editor screenshot (look at 0x82 and 0x19B)</a></p>