title: ending value of a file prints out as questionmark
body: <p>I am having a problem with writing from one file to another, especially the last value, which is end of file, prints out as question mark in a black square.</p>
  
  <p>My code is supposed to replace text on some conditions which works perfectly just the last value which is EOF is making a little problem.</p>
  
  <p>Any ideas?</p>
  
  <p><strong>input file</strong></p>
  
  <pre><code>Hi, this is *list* version v2.
  Contains 8 words. 123
  </code></pre>
  
  <p><strong>output file</strong></p>
  
  <pre><code>___, _____ ___ *_____* _____ ___.
  _____ ___ _____. ___�
  </code></pre>
  
  <p><strong>C source file</strong></p>
  
  <pre><code>int main()
  {
      FILE *li, *sa;
  
      li = fopen("list.txt", "r");
      sa = fopen("sablona.txt", "w");
  
      int c, poc = 0;
      char a[3] = "___"; 
      char b[5] = "_____";
  
      while ( ! feof(li) &gt; 0 ) {
  
          c = getc(li);
  
          if ( isalnum(c) )
              poc++;
          else if ( poc &gt; 0 &amp;&amp; poc &lt; 4 ) {
              fputs(a, sa);
              poc = 0;
          }
          else if ( poc &gt;= 4 ) {
              fputs(b, sa); 
              poc = 0;
          }
  
          if ( ! isalnum(c) )
              putc(c, sa);
      }
  
      fclose(li);
      fclose(sa);
  
      return 0;
  }
  </code></pre>