How would I go to cast/convert literal char '0' to int 0?
char '0'
int 0
i.e.:
char string[] = "0101"; char ch = string[0]; x = magic(ch); if (x) printf("int zero")
ch = 0;
Now, if you want to convert any digit-character to its numeric equivalent, you'd need something like:
ch = ch - '0';
1.4m articles
1.4m replys
5 comments
57.0k users