isprint
Tests for a printable character (function or macro)
#include <ctype.h>
int isprint (
int c);
isprint returns a nonzero value when the argument is a printable character. Otherwise, a value of 0 is returned.
The isprint function or macro tests for any printable character, including a space character.
isalnum, isalpha, iscntrl, isdigit, islower, ispunct, isspace, isupper, isxdigit, tolower, toupper
#include <stdlib.h> #include <ctype.h> #include <stdio.h> main() { int i; while((i = getch()) != ’0’) printf("%s\r\n",isprint(i) ? "yes" : "no"); }