#include <stdlib.h>
int atoi (const char *nptr);
int atoi
The atoi function converts the initial portion of the string pointed to by nptr to int representation. Except for the behavior in error, it is equivalent to
(int)strtol (nptr, (char **)NULL, 10)
The atoi function returns the converted value.