1 #include<ctype.h> 2 main() 3 { 4 charstr[]="123@#FDsP[e?"; 5 inti; 6 for(i=0;str[i]!=0;i++) 7 if(islower(str[i]))printf("%cisalower-casecharacter\n",str[i]); 8 }
| 
 isdigit 
 | 
|
| 
 表头文件 
 | 
 #include<ctype.h> 
 | 
| 
 定义函数 
 | 
 int isdigit(char c) 
 | 
| 
 函数说明 
 | 
 检查参数c是否为阿拉伯数字0到9。 
 | 
| 
 返回值 
 | 
 若参数c为阿拉伯数字,则返回TRUE,否则返回NULL(0)。 
 | 
| 
 附加说明 
 | 
 此为宏定义,非真正函数。 
 | 
1 #include<ctype.h> 2 main() 3 { 4 char str[]="123@#FDsP[e?"; 5 int i; 6 for(i=0;str[i]!=0;i++) 7 { 8 if( isdigit (str[i]) ) 9 printf( "%c is an digit character\n",str[i] ) 10 } 11 }
#include <ctype.h> #include <stdio.h> int main() { char Test[]="a1B2c3D4"; char *pos; pos=Test; while(*pos!=0) { if(isupper(*pos)) printf("%c",*pos); pos++; } printf("\n"); return 0; }
原文:http://www.cnblogs.com/nynu-ycg6/p/4638324.html