title: I want to read some integers from a file it runs fine but it save 0 in the array instead of the other numbers I want to get
body: <p>so my function goes like this which i'm calling in the main</p>
  <p>the text in file</p>
  <pre><code>1 2 3
  4 5 6
  </code></pre>
  <p>the result:</p>
  <pre><code>No of Rows : 2
  The Contents of File are given below :
  0  0  0
  0  0  0
  </code></pre>
  <p>can someone help me please!!!</p>
  <p>the code</p>
  <pre><code>#include&lt;sdtio.h&gt;
  #include&lt;string.h&gt;
  #include&lt;stdlib.h&gt;
  int runningProcess[10];
  int lockedProcess[10];
  int waitingProcess[10];
  int numOfRows=1;
  void fileReading(){
      FILE* fptr;
      fptr = fopen(&quot;test.txt&quot;,&quot;r&quot;);
      char c;
      for (c = getc(fptr); c != EOF; c = getc(fptr)){
          // Increment count if this character is newline
          if (c == '\n'){
              numOfRows = numOfRows + 1;
          } 
      }
      printf(&quot;No of Rows : %d\n&quot;,numOfRows);
      
      for(int i=0; i&lt;numOfRows;i++){
          fscanf(fptr, &quot;%d* %d* %d*&quot;, &amp;runningProcess[i], &amp;lockedProcess[i], &amp;waitingProcess[i]);   
      }
      printf(&quot;The Contents of File are given below :\n&quot;);
      for (int i = 0; i &lt; numOfRows; i++)
      {
          printf(&quot;%d  %d  %d\n&quot;, runningProcess[i],lockedProcess[i],waitingProcess[i]);
      }
      fclose(fptr); 
  }c
  </code></pre>