根据输入字符的 ASCII码来判别字符的类别。由ASCII码表可知ASCII值小于32的为控制字 符。在 “0”和“9”之间的为数字,在“A”和“Z”之间为大写字母,在“a”和“z”之 间为小写字母,其余则为其它字符。 #include "stdio.h" #include "string.h" int main() { c har c; printf("input a character:"); _____________________________________________ i f (c<32) printf("This is a control character\n"); _____________________________________________ printf("This is a digit\n"); else if_______________________________________ printf("This is a capital letter\n"); e lse if(c>='a'&&c<='z') printf("This is a small letter\n"); ____________________________________________ printf("This is another character\n"); return0;}