title: Why does strlen() counts this wrong?
body: <p>I am trying to find a way to count digits of an integer (for example for 01 there is 2 digits)I thought turning integer to string then using strlen() would help but it did not. How can I achieve my goal?</p>
  <pre><code>int main()
  {
      int someInt = 01;
      char str[12];
      sprintf(str, &quot;%d&quot;, someInt);
      printf(&quot;%d&quot;,strlen(str));
  }
  
  </code></pre>