December 2005
Beginner to intermediate
618 pages
20h 19m
English
isdigit
Ascertains whether a given character is a decimal digit
#include <ctype.h> intisdigit( intc);
The function isdigit()
tests whether its character argument is a digit. isdigit() returns a nonzero value (that
is, true) for the ten characters
between '0' (not to be confused
with the null character, '\0')
and '9' inclusive. Otherwise, the
function returns 0 (false).
See the example for isprint() in this
chapter.
The corresponding C99 function for wide characters, iswdigit(); isalnum(), isalpha(), isblank(), iscntrl(), isgraph(), islower(), isprint(), ispunct(), isspace(), isupper(), isxdigit(), setlocale()
Read now
Unlock full access