int x = character - '0';
int i = (int)(c - '0');
Use ASCII chart.
int i=65;
char ch;
ch= (char)i;
printf("Expected value of ch: A. This value is found by using a ASCII chart");
c = i +'0';
strcpy(str, "98993489");
val = atoi(str);
printf("String value = %s, Int value = %d
", str, val);
char c = '5';
int x = c - '0';
int i;
char c = 'A';
i = (int)c;