title: ANSI-C: maximum number of characters printing a decimal int
body: <p>I'd like to know if it is an easy way of determining the maximum number of characters to print a decimal <code>int</code>.</p>
  
  <p>I know <code>&lt;limits.h&gt;</code> contains definitions like <code>INT_MAX</code> that say the maximum <strong>value</strong> an int can assume, but it is not what I want.</p>
  
  <p>I'd like to be able to do something like:</p>
  
  <pre><code>int get_int( void )
  {
      char draft[ MAX_CHAR_OF_A_DECIMAL_INT ];
  
      fgets( draft, sizeof( draft ), stdin );
      return strtol( draft, NULL, 10 );
  }
  </code></pre>
  
  <p>But how to find the value of <code>MAX_CHAR_OF_A_DECIMAL_INT</code> in a portable and low overheaded way?</p>
  
  <p>Thanks!</p>