title: fgets() is being weird when scanning lines that contain a % symbol
body: <p>This is part of a school project, so I can't show anybody my code, but suffice to say, my project has to read, copy, and edit its own source code (because we're studying polymorphic malware). I'm using fgets() to read each line of code, but whenever I have a line of code with a modulo operation or format string, the % symbol and whatever non-whitespace character that comes after it is missing. I'm guessing that fgets() is treating that % symbol like a format string, so how do I tell it not to do that?</p>
  
  <p>Post answer edit:
  I am posting one line of code to demonstrate what was wrong.
  This is how I was getting strings from a file:</p>
  
  <pre><code>fgets(line, 128, src_file);
  </code></pre>
  
  <p>This is how I was writing that string to a new file (which was wrong)</p>
  
  <pre><code>fprintf(out_file, line);
  </code></pre>