int atoi(const char *nptr);

atoi converts the initial portion of the string pointed to by nptr to an int representation.

atoi does not affect the value of errno on an error. If the value of the result cannot be represented, the behavior is undefined.

Except for the behavior on error, atoi is equivalent to (int)strtol(nptr, (char **)NULL, 10).

atoi returns the converted value.

See Also