[c] Convert a character digit to the corresponding integer in C