c 头文件(二)

测试<ctype.h>函数

 #include <stdio.h>
#include <ctype.h> int main(){ int num = ;
for(int i = ; i < ; ++i){
if(isalnum(i)){
printf("%d\t'%c'\t", i, i);
++num;
}
if(num == ){
num = ;
puts("");
}
}
puts("");
return ;
}

显示结果

c 头文件<ctype.h>(二)

 #include <stdio.h>
#include <ctype.h> int main(){ int num = ;
for(int i = ; i < ; ++i){
if(isalpha(i)){
printf("%d\t'%c'\t", i, i);
++num;
}
if(num == ){
num = ;
puts("");
}
}
puts("");
return ;
}

c 头文件<ctype.h>(二)

 #include <stdio.h>
#include <ctype.h> int main(){ for(int i = ; i < ; ++i){
if(isdigit(i)){
printf("ASCII=%d\t'%c'\n", i, i);
}
}
return ;
}

c 头文件<ctype.h>(二)

上一篇:Linux文件系统及文件类型


下一篇:git 入门教程之本地仓库