isalnum
Tests for an alphanumeric character (function or macro)
#include <ctype.h>
int isalnum (
int c);
This function or macro returns a value of 0 if the argument is neither an alphabetic character nor a digit. Otherwise, a nonzero value is returned.
The isalnum function or macro tests if the argument c is an alphanumeric character (a to z, A to Z, or 0 to 9). An alphanumeric character is any character for which isalpha or isdigit is true.
#include <ctype.h> #include <stdio.h> main () { printf ("%d %d \w", isalnum (’Q’), isalnum (’!’)); }
produces the following:
1 0