title: overflow when change from string to int in C
body: <p>In the C programming language, a string such as <code>"2147483649"</code> overflows as an int since the largest unsigned int is <code>2147483647</code>. When I want to convert strings of integers to <code>int</code>s, how do I go about checking for these overflow cases?</p>
  
  <p>I can't just check if it is <code>&gt;=-(2^32-1)</code> and <code>&lt;= (2^32-1)</code> since the process of converting this string to an <code>int</code> (eg <code>atoi()</code>) already changes this value. Is there an easy way instead of checking the number of digits of the string before converting and also each digit at a time to make sure it's within the range of <code>int</code>s?</p>