how to convert a char to an int c code example
Example 1: char to int c++
int x = (int)character - 48;
Example 2: turn a char into an int in c
int x = character - '0';
Example 3: int to char in c
c = i +'0';
Example 4: c char to int
int i;
char c = 'A';
i = (int)c;