Scroll Down to See All
▾
abort
abs
acos
asctime
asctime_r
asin
assert
atan
atan2
atexit
atof
atoi
atol
bsearch
btowc
calloc
catclose
catgets
catopen
ceil
clearerr
clock
cos
cosh
ctime
ctime_r
difftime
div
erf
erfc
exit
exp
fabs
fclose
fdopen
feof
ferror
fflush
fgetc
fgetpos
fgets
fgetwc
fgetws
fopen
fprintf
fputc
fputws
fread
free
freopen
frexp
fscanf
fseek
fsetpos
ftell
fwide
fwprintf
fwrite
fwscanf
getc
getchar
getenv
getwc
getwchar
gmtime
gmtime_r
hypot
isalnum
isalpha
isascii
isblank
iscntrl
isgraph
islower
isprint
ispunct
isspace
isupper
iswalnum
iswalpha
iswblank
iswcntrl
iswctype
iswdigit
iswgraph
iswlower
iswprint
iswpunct
iswspace
iswupper
iswxdigit
isxdigit
j0
j1
jn
labs
ldexp
ldiv
localeconv
localtime
localtime_r
log
log10
longjmp
malloc
mblen
mbrlen
mbrtowc
mbsinit
mbsrtowcs
mbstowcs
mbtowc
memchr
memcmp
memcpy
memmove
memset
mktime
modf
nextafter
nextafterl
nexttoward
nexttowardl
nl_langinfo
perror
pow
printf
putc
putchar
putenv
puts
putwc
putwchar
qsort
quantexpd32
quantexpd64
quantexpd128
quantized32
quantized64
quantized128
samequantumd32
raise
rand
rand_r
realloc
regcomp
regerror
regexec
regfree
remove
rename
rewind
scanf
setbuf
setjmp
setlocale
setvbuf
signal
sin
sinh
snprintf
sprintf
sqrt
srand
sscanf
strcasecmp
strcat
strchr
strcmp
strcoll
strcpy
strcspn
strerror
strfmon
strftime
strlen
strncasecmp
strncat
strncmp
strncpy
strpbrk
strptime
strrchr
strspn
strstr
strtod
strtod32
strtod64
strtod128
strtof
strtok
strtok_r
strtol
strtold
strtoul
strxfrm
swprintf
swscanf
system
tan
tanh
time
time64
tmpfile
tmpnam
toascii
tolower
toupper
towctrans
towlower
towupper
ungetc
ungetwc
va_arg
va_copy
va_end
va_start
vfprintf
vfscanf
vfwprintf
vfwscanf
vprintf
vscanf
vsprintf
vsnprintf
vsscanf
vswprintf
vswscanf
vwprintf
vwscanf
wcrtomb
wcscat
wcschr
wcscmp
wcscoll
wcscpy
wcscpy
wcsftime
wcslen
wcsncat
wcsncmp
wcsncpy
wcspbrk
wcsptime
wcsrchr
wcsrtombs
wcsspn
wcsstr
wcstod
wcstod32
wcstod64
wcstod128
wcstof
wcstok
wcstol
wcstold
wcstombs
wcstoul
wcsxfrm
wctob
wctomb
wctrans
wctype
wcwidth
wmemchr
wmemcmp
wmemcpy
wmemmove
wmemset
wprintf
wscanf
y0
y1
yn
☰
Home
SQL
Python
Sequence Slicing
Python Functions
C Programming
Things Not To Do
C Standard Library Functions
Code Examples
Variables in C
Data Types in C
Tools
Coding Tools
URL Encoder/Decoder
HTML Encoder
CSS Minifier
Javascript Minifier
HTML Minifier
JSON Tree Viewer
Text Processing
Text Analyzer
Case Converter
Markdown Editor
Converters
ASCII Converter
CSS Units Converter
HTML Entities Converter
JSON to XML Converter
JSON to JS Object Converter
YAML to JSON Converter
Tables
ASCII Table
HTML Tags Table
Metric Prefixes Table
Go Back
Home
c-programming
functions
isdigit
Function Details : isdigit
prototype
description
parameters
Return Value
examples
int
isdigit
(
int
c
)
;
Return Type : int
Integer type (typically 4 bytes, -2,147,483,648 to 2,147,483,647)
Read about
return
values of
isdigit
function .
1st Parameter Type : int
Integer type (typically 4 bytes, -2,147,483,648 to 2,147,483,647)
1st Parameter
The character to be tested, passed as an `unsigned char` cast to an `int`, or `EOF`
Read more about parameters of isdigit in
parameters
section
The
isdigit
function in C language Checks whether the character is a decimal digit.
The isdigit function tests whether c is a decimal digit character (0 through 9). This function is locale-independent.
The
isdigit
function takes 1 parameter:
•
int
`c`: The character to be tested, passed as an `unsigned char` cast to an `int`, or `EOF`
Checks if the given character `c` is a decimal digit (0–9). Returns a nonzero value if `c` is a digit, and `0` otherwise.
The
isdigit
function return value :
Returns non-zero if the character is a digit (0-9), 0 otherwise
Basic Usage
Numeric Input Validation
Digit Sum
Copy Code
Run Code
Output
This example demonstrates basic usage of isdigit with various characters.