#include <ctype.h>
int isgraph( int ch );
如果参数是除空格外的可打印字符(可见的字符),函数返回非零值,否则返回零值。
#include <stdio.h> #include <ctype.h> int main() { char c1 = 'A'; char c2 = ' '; printf("isgraph(c1) = %d\n", isgraph(c1)); printf("isgraph(c2) = %d\n", isgraph(c2)); return 0; }
输出结果:
isgraph(c1) = 1 isgraph(c2) = 0