title: counting the number of strings in a text file containing numbers as well
body: <p>I wanted to only count the number of strings in a text file, containing numbers as well. But the code below, counts even the numbers in the file as strings. How do I rectify the problem?</p>
  
  <pre><code>int count;
  char *temp;
  FILE *fp;
  
   fp = fopen("multiplexyz.txt" ,"r" );
  
   while(fscanf(fp,"%s",temp) != EOF )
   {
       count++;
   }
  
   printf("%d ",count);
   return 0;
  </code></pre>
  
  <p>}</p>