#include <ctype.h>
int isupper( int ch );
如果参数是大写字母字符,函数返回非零值,否则返回零值。
#include <stdio.h> #include <ctype.h> int main() { char c1 = 'A'; char c2 = 'a'; printf("isupper(c1) = %d\n", isupper(c1)); printf("isupper(c2) = %d\n", isupper(c2)); return 0; }
输出结果:
isupper(c1) = 1 isupper(c2) = 0