C Tutorial/ctype.h/isgraph
Версия от 14:21, 25 мая 2010; (обсуждение)
isgraph
Item Value Header file ctype.h Declaration int isgraph(int ch); Return returns nonzero if ch is a printable character other than space or zero is returned.
For ASCII environments, printable characters are in the range 0x21 through 0x7E.
#include <ctype.h>
#include <stdio.h>
int main(void)
{
char ch;
for(;;) {
ch = getchar();
if(isgraph(ch)){
printf("%c is printable\n", ch);
}
if(ch == "."){
break;
}
}
return 0;
}