A character classifier is a function or macro from <ctype.h> that tests whether an int argument belongs to a character class. The interface includes isalpha, isdigit, isspace, isupper, islower, ispunct, and related classifiers; each accepts and returns int for historical reasons. section 8.5
Classifying digits before conversion
Use isdigit(a) before converting a decimal character with a - '0'. Decimal digits are consecutive, and isdigit is not locale-dependent. Other classifiers, such as isupper, can guide subsequent processing.

