title: Fast input for long and long long in C?
body: <p>So i have been using this function for codechef problems for quite some while now as a fast input method for integers. </p>
  
  <p>My question is how this actually works,what is fgetc_unlocked(stdin) (even though its commented) and most importantly how can I optimise it to run for long and long long.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>inline void Scan_f(int a)
  {
  char c = 0;
  while(c&lt;33)//shouldn't value of c to compare be less than 9 as digit vary between 0 to 9?? 
  //c = fgetc_unlocked(stdin);
  c = getc(stdin);
  a = 0;
  while(c&gt;33)
  {
  a = a*10 + c - '0';
  //c = fgetc_unlocked(stdin);
  c = getc(stdin);
  }
  </code></pre>