title: Extract Characters From Text File In C Programming Language
body: <p>Create a program to extract (only) the alphabetic characters contained in a text file, and dump them to a different file. The extracted characters must be those whose ASCII code is 32 to 127.</p>
  
  <p>I am not able to solve this, can you help me?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      FILE *fp1;
      FILE *fp2;
      char ch;
      fp1 = fopen("bin.txt","r");
      fp2 = fopen("text.txt","w");
      ch = fgetc(fp1);
      while(ch != EOF)
      {
          if(ch &gt;= '32' &amp;&amp; ch &lt;= '127')
              putc(ch,fp2);
          else
              continue;
      }
      fclose(fp1);
      fclose(fp2);
      return 0;
  }
  </code></pre>