title: Ints from text file are being read twice using fscanf to store into arrays
body: <pre><code>int main(int argc, char **argv)
  {
      FILE *file  = fopen("Offices.txt", "r");
      char officeArray[10];
      int yCoordinate[10];
      int xCoordinate[10];
  
      int i=0;
      int x, y;
      char office;
  
      while(fscanf(file, "%c,%d,%d", &amp;office, &amp;x, &amp;y) &gt; 0)
      {
          officeArray[i] = office;
          xCoordinate[i] = x;
          yCoordinate[i] = y;
          printf("%c,%d,%d \n", officeArray[i], xCoordinate[i], yCoordinate[i]);
          i++;
      }
  
      fclose(file);
  
      return 0;
  }
  </code></pre>
  
  <p>I have a text file of node letters and coordinates: </p>
  
  <pre>A,1,1
  B,1,5
  C,3,7
  D,5,5
  E,5,1
  </pre>
  
  <p>My output is:</p>
  
  <pre>A,1,1 
  ,1,1
  B,1,5 
  ,1,5
  C,3,7 
  ,3,7 
  D,5,5 
  ,5,5 
  E,5,1 
  ,5,1 
  </pre>
  
  <p>I can't tell why I am getting double the integer reads from the text file.</p>