title: How i can store the data read from the file in new array and print all the data from the new array
body: <p>Thus I have read the data from file and print in display but I cannot save the data read from file into new array.</p>
  <p>file data eg:</p>
  <pre><code>23,56
  78,65
  </code></pre>
  <p>My code</p>
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  int main() {
      FILE *ptr = fopen(&quot;datasetLR1.txt&quot;, &quot;r&quot;);
      if(ptr == NULL) {
          printf(&quot;File not found or allocated!&quot;);
          exit(1);
       }
      int str[85];
      while(fgets(str, sizeof(str), ptr) != NULL) { 
          printf(fgets(str, sizeof(str), ptr));
      }
      system(&quot;pause&quot;);
      fclose(ptr);
      return 0;
  }
  </code></pre>