Is it printable: isgraph
#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; }