With atoi there is no way to find out if the passed string is really a number since there is no special "return" error. It also processes only decimal values ββ(base 10), so it cannot process arbitrary bases, for example, for example. strtol . Also, it cannot handle values ββlarger than the signed integer (32 bits on most platforms).
source share