Function name : isgraph
Header file : <ctype.h>
Function prototype : int isgraph(int ch);
Function : Determine whether the character is a printable character except spaces
Parameters : int ch character to be checked
Return value : If ch is not a printable character other than spaces, return 0; if ch is a printable character other than spaces, return non-0
Program example : Determine whether the entered characters are printable characters except spaces.
#include<ctype.h>#include<stdio.h>intmain(){charch;printf(inputacharacter:);scanf(%c,&ch);if(isgraph(ch)){printf(%cisgraph.,ch) ;}else{printf(%cisnotgraph.,ch);}putchar('n');return0;}
Running results:
inputacharacter:ggisgraph.