title: extract string and integers from text file and put them into array C language
body: <p>I am having a problem here and I can't figure it out so any help would be appreciated , I have a text file that has strings and integers separated by comma and I want to extract the integers and put them into an array and extract the strings and put them into another array and this is the text file sample : </p>
  
  <blockquote>
    <p>1,2,dfds,dv,h,dfdd,wfdsf,e,3,4,yee,rss,a,6,8,5</p>
  </blockquote>
  
  <p>and this is the code : </p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;stdlib.h&gt;
  
  #include "vector.h"
  
  void readDataByDelimiter(const char* File, vector *v)
  {
      FILE *myFile;
      myFile = fopen(File, "r");
  
      //read file into array
      int numberArray[16];
      int i;
      char b[100];
  
      for (i = 0; i &lt; 16; i++)
      {
          fscanf(myFile, "%d,%c,",&amp;numberArray[i] , &amp;b[i]);
      }
  
      for (i = 0; i &lt; 16; i++)
      {
          printf("Number is: %d\n\n", numberArray[i]);
          printf("Number is: %c\n\n", b[i]);
      }
  }
  </code></pre>