title: C .Scan specific part of line from a file and assign it to some variable
body: <p>if I have this data in a file :</p>
  <blockquote>
  <p>Mercure 99842 1 18 2001 5 30 1991 16 12.5</p>
  <p>Mazda 123961 2 20 1993 6 15 1993 19.3 16.7</p>
  </blockquote>
  <p>and I'm interested in , say, just the third number of each line, and I want to store it in an array.</p>
  <p>What I used to do , is to use some variables to store all the values in the line , and then I pick the one I'm interested in .
  for example :</p>
  <pre><code>while(fscanf(file,&quot;%s %d %d %d %d %d %d %f %f&quot;,a,&amp;b,&amp;array[i],&amp;d,&amp;e,&amp;r,&amp;t,&amp;g,&amp;h)!=EOF)
       {i++;}
  </code></pre>
  <p>array[i] is storing the value that I'm interested in , and the other variables are just to mach the format , I do not need them .</p>
  <p>Is there any better way of doing this ?</p>