Well.. isdigit() takes a single byte representation of an int, and tells you if the value is within {0, 1, 2, ..., 9}, any given char can be seen as an int representing any of the the values {0, 1, 2, ..., 255} so, when your input is a number, which seen as a single char can
only represent values within the orriginal {0, 1, 2, ..., 9}, but when given a char ie 'c', it will infact be converted to the int value 99, which is way beond the scope for isdigit() to check.
Testing for chars, you'd might want to take a look at isascii(), which is not part of the ISO/ANSI definition, so perhaps a combination of
Code:
if(isdigit(a_char))
// an int
else
if(isprint(a_char))
// a printable char besides int
else
// must be something else
If this dosn't give you a hint, then you might give a better description on what you're trying to achieve here, since from what I can tell it looks as if you want to test if input is a char or an int.