If you're not worried about encodings (and as this sounds like homework I doubt you are) you can utilise the fact that the character encodings for digits in ascii are all in order from 48 (for '0') to 57 (for '9').
Therefore, the integer value for any digit is the digit less 48 or, expressed in code (and you don't even need to know that '0' is 48, also you can do arithmetic with chars, there just really small ints under the covers).
.
char c = '1';
int i = c - '0'; // i is now equal to 1, not '1'
Hope this helps,
EDIT:
Me saying "If you're not worried about encodings" can (and probably should) be interpeted as "I hope to hell you are not worried about encodings, because I don't know enough about them, and I can only be sure about how decimal digits are represented in AscII".
Apologies if this has caused any confusion.