c char int values code example
Example 1: char to int in c
strcpy(str, "98993489");
val = atoi(str);
printf("String value = %s, Int value = %d\n", str, val);
Example 2: c char to int
int i;
char c = 'A';
i = (int)c;
strcpy(str, "98993489");
val = atoi(str);
printf("String value = %s, Int value = %d\n", str, val);
int i;
char c = 'A';
i = (int)c;