15_ctype.c (449B)
1 /* ctype.h classifiers + tolower/toupper. */ 2 3 #include <ctype.h> 4 #include <stdio.h> 5 6 int main(void) { 7 if (!isdigit('7') || isdigit('a')) return 1; 8 if (!isalpha('Q') || isalpha('5')) return 2; 9 if (!isspace(' ') || isspace('x')) return 3; 10 if (!isupper('Z') || isupper('z')) return 4; 11 if (!islower('z') || islower('Z')) return 5; 12 if (tolower('Z') != 'z') return 6; 13 if (toupper('z') != 'Z') return 7; 14 printf("ctype ok\n"); 15 return 0; 16 }