c语言学习,isascii()函数分析
1:isascii() 函数说明:
检查参数c,是不是ASCI码字符
2:函数原型:
int isascii(int c)
3:函数参数:
参数c,为检测ASCI码
4:返回值:
参数c为ASCII码字符,返回TRUE,否则返回NULL(0)
5:示例:
#include<ctype.h>
#include<stdio.h>
int main (){
int i;
for(i = 125; i < 130; i++){
if( isascii(i) )
printf("%d is an ascii character %c\n",i,i);
else
printf("%d is not an ascii character \n",i);
}
return 0;
}
6:输出结果: