title: I'd like to know how I can store input from a semi colon separated text if some fields are missing
body: <p>How can I skip scanf if some field is missing like between "oeb" and "7"?</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main ()
  {
      int,a,b,c;
      char str1[200];
      char str2[200];
      char str[] ="1;2;oeb;;7;ed";
      scanf("%d;%d;%[^;];%d;%[^\n]",&amp;a,&amp;b,str1,&amp;c,str2);
      return 0;
  }
  </code></pre>