Related questions
How to convert char to integer in C?
Possible Duplicates:
How to convert a single char into an int
Character to integer in C
Can any body tell me how to convert a char to int?
char c[]={'1',':','3'};
int i=int(c[0]);
…
Convert hex string (char []) to int?
I have a char[] that contains a value such as "0x1800785" but the function I want to give the value to requires an int, how can I convert this to an int? I have searched around but cannot find an …
In C, why is sizeof(char) 1, when 'a' is an int?
I tried
printf("%d, %d\n", sizeof(char), sizeof('c'));
and got 1, 4 as output. If size of a character is one, why does 'c' give me 4? I guess it's because it's an integer. So when I do char ch = 'c'; …