title: Skip a line while reading a file in C
body: <p>I have a problem and I haven't found a solution that works. It's really easy, but I don't understand what to do.</p>
  
  <p>I have a file with some lines, like:</p>
  
  <pre><code>#comment
  
  #comment
  
  icecream 5
  
  pizza 10
  
  pie 7
  
  #comment
  
  tortillas 5
  fajitas 5
  </code></pre>
  
  <p>And I want that my program just read the lines that don't start with <code>#</code>.</p>
  
  <pre><code>FILE *pf;
  char first [20], second [20];
  pf = fopen("config.conf", "r");
  if (pf)
  {
      while (! feof(pf))
      {
          fscanf(pf, "%s \t ", first);
          while(!strcmp(first,"#")){ `HERE I NEED JUMP TO NEXT LINE`
              fscanf(pf, "%s \t ", first);
          }
          fscanf (pf, "%s \t ", second);
          printf("Food: %s \t Cost: %s \n", first, second);
      }
      fclose(pf);
  }
  else
      printf( "Errore nell'aprire config.conf\n");
  </code></pre>