title: How does C Handle Integer Literals with Leading Zeros, and What About atoi?
body: <p>When you create an integer with leading zeros, how does c handle it? Is it different for different versions of C?</p>
  
  <p>In my case, they just seem to be dropped (but maybe that is what printf does?):</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main() {
      int a = 005;
      printf("%i\n", a);
      return 0;
  }
  </code></pre>
  
  <p>I know I can use printf to pad with 0s, but I am just wondering how this works.</p>