title: how to extaract data from file starting from 2nd line in c
body: <p>Im very new to this language, can you help me:</p>
  
  <p>Instead of making the user input col, row, and direction(scanf). I want to extract the data from file(format below)</p>
  
  <p>From the file format i do not want to extract the first line(5,6), i only want to extract the remaining lines.</p>
  
  <p>Below is a code of how to extract data from a file(using command line arguments), but this code extract the first line also, and only prints the lines.I do not want to print the line but to extract the data from a file instead of making the user input it.</p>
  
  <p>File format:
  colrow direction(starting from 2nd line)</p>
  
  <pre><code>5,6
  A0 H
  D0 V
  C1 V
  A4 H
  F0 v
  </code></pre>
  
  <p>code of scanf</p>
  
  <pre><code>
  yourcolumn = getchar();
  col = charToNum(yourcolumn);    //function to input column
  
  printf("enter row");
  scanf("%d",&amp;row);
  
  printf("h: horizontally or v: vertically?\n");
  scanf(" %c",&amp;direction);
  </code></pre>
  
  <p>Code for extracting data from file:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main(int argc, char* argv[])
  {
      char const* const fileName = argv[1]; /* should check that argc &gt; 1 */
      FILE* file = fopen(fileName, "r"); /* should check the result */
      char line[256];
  
      while (fgets(line, sizeof(line), file)) {
          /* note that fgets don't strip the terminating \n, checking its
             presence would allow to handle lines longer that sizeof(line) */
          printf("%s", line); 
      }
      /* may check feof here to make a difference between eof and io failure -- network
         timeout for instance */
  
      fclose(file);
  
      return 0;
  }
  
  </code></pre>