#include <cctype> int isalnum( int ch );
isalnum() 函式如果它的引數是數字或字母,則返回非零值。否則,返回零。
char c; scanf( "%c", &c ); if( isalnum(c) ) printf( "You entered the alphanumeric character %c\n", c );