#include #include #define ctype( func, data1, data2 ) printf("%s( %s ) = %d\t\t%s( %s ) = %d\n",\ #func, #data1, func(data1), #func, #data2, func(data2)) main() { ctype( isalnum, '7', '*' ); ctype( isalpha, 'a', '7' ); ctype( iscntrl, ' ', '\t'); ctype( isdigit, '7', 'a' ); ctype( isgraph, '7', ' ' ); ctype( islower, 'a', 'A' ); ctype( isprint, ' ', '\t'); ctype( ispunct, '*', ' ' ); ctype( isspace, '7', '\t'); ctype( isupper, 'a', 'A' ); ctype( isxdigit, '7', 'a' ); printf( "tolower( 'A' ) = %c\n", tolower('A')); printf( "toupper( 'a' ) = %c\n", toupper('a')); }