You can use atoi to convert strings as integers. Char and int are the same in C int main (int argc, char** ...
stackoverflow.com