title: fprintf(fp, "%c",10) not behaving as expected
body: <p>Here's my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  main(){
      FILE* fp = fopen("img.ppm","w");
      fprintf(fp,"%c", 10);
      fclose(fp);
      return 0;
  }
  </code></pre>
  
  <p>for some reason that I am unable to uncover, this writes 2 bytes to the file: "0x0D 0x0A" while the behaviour I would expect is for it to just write "0x0A" which is 10 in decimal. It seems to work fine with every single other value between 0 and 255 included, it just writes one byte to the file. I am completely lost, any help?</p>