#include <stdlib.h>
int atoi(const char *s);
atoi() converts the string s to an integer value, skipping over white space at the beginning of s. It stops converting when it reaches either the end of the string or a character that cannot be part of the number. The number format accepted by atoi is the following:
Number = [+|-]Digit{Digit}
atoi() returns the converted integer value.
strtol(), and