char c; //some input to c int number; number = c -'0';
char c[2]; c[1]=0; //some input to c number = atoi(c);