convert char 1 to int 1 in c code example Example: turn a char into an int in c int x = character - '0';