title: query regarding white space in fscanf()
body: <p>CODE :-</p>
  <pre><code>while ( fscanf ( fp,&quot;%s %d %f&quot;, e.name, &amp;e.age, &amp;e.bs ) !=EOF )
  {
      printf ( &quot;%s     %d     %f\n&quot;, e.name, e.age, e.bs ) ;
  } 
  </code></pre>
  <p>Say I am having following sentences in a file:-</p>
  <blockquote>
  <p>fname lname 20 200000</p>
  <p>fname1 lname1 30 50000</p>
  </blockquote>
  <p>The desired output is :-</p>
  <pre><code>fname lname     20     200000.0000
  
  fname1 lname1     30     50000.0000
  </code></pre>
  <p>But the output I am getting is :-</p>
  <pre><code>fname     (garbage value)     (garbage value)
   
  lname      20     200000.0000
  
  fname1     20     200000.0000
  
  lname1     30     50000.0000
  </code></pre>
  <p>The above problem is due to the fact that <code>%s</code> do not read white spaces, hence it is splitting my <code>fname lname</code> into two parts.</p>
  <p>Is there any solution to get the desired output?</p>