isdigit takes a char parameter and returns TRUE or FALSE depending on whether it's a digit or not. So the following will output 01:
Code:
printf("%c%c", isdigit('x')?'1':'0', isdigit('3')?'1':'0');
To determine whether input is valid you have to scan the string and see what you find. "123a456" is not a valid integer because 'a' is not a digit. "-2.35e+17" is a valid floating point number and the validation for that is more complex: optional sign, a digit, a dot, some digits, an e, optional sign, some digits.