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