title: How to read specific column of csv in C
body: <p>I have an csv file and I want to get 2nd column's data. it is like that: </p>
  
  <pre><code> 1st row:    4   8   6
   2nd row:    3   2   2
   3rd row:    7   7   5
  </code></pre>
  
  <p>I will add them into AVLTREE but main problem is how to get specially 2nd column's data? They delimited with semicolon.</p>
  
  <pre><code>4;8;6;
  3;2;2;
  7;7;5;
  </code></pre>
  
  <p>So far I have just this code</p>
  
  <pre><code>int main()
  {
  int c;
  char buffer[1000];
  FILE *f = fopen("file.txt", "r");
  if(f == NULL)
  {
      printf("Error can't open file \n");
  }
  while (fgets(buffer,1000,f) != NULL)
  {
      char *p = strtok(buffer, ";");
      while(p)
      {
          printf("%s\n", p);
          p=strtok(NULL, ";");
      }
  
      printf("%c",c);
  }
  fclose(f);
  }
  </code></pre>