ctype.h( 三 )

isxdigit函式名称: isxdigit函式原型: int isxdigit(int ch);函式功能: 检查ch是否是一个16进制数学字元(即0-9,或A-F,或a-f)函式返回: 是返回非0,否则返回0参数说明:所属档案: <ctype.h>#include<stdio.h>#include<ctype.h>intmain(){charch1='1';charch2='a';if(isxdigit(ch1)!=0)printf("%cistheASCIIhexadecimalnumber\n",ch1);elseprintf("%cisnottheASCIIhexadecimalnumber\n",ch1);if(isxdigit(ch2)!=0)printf("%cistheASCIIhexadecimalnumber\n",ch2);elseprintf("%cisnottheASCIIhexadecimalnumber\n",ch2);return0;}isascii函式名称: isascii函式原型: int isascii(int ch)函式功能: 测试参数是否是ASCII码0-127函式返回: 是返回非0,否则返回0参数说明: ch-被测参数所属档案: <ctype.h>#include<stdio.h>#include<ctype.h>charchars[]={'A',0x80,'Z'};#defineSIZEsizeof(chars)/sizeof(char)intmain(){inti;for(i=0;i<SIZE;i++){printf("Char%cis%sanASCIIcharacter\n",chars[i],(isascii(chars[i]))?"":"not");}return0;}