isgraph() - Character Function
How is "isgraph()" used in C++?
is used to check if the argument is a graphical representation or character that can be printed except whitespace characters. If graphical representation are not found, the function returns zero.
int isgraph ( int c );
if( isgraph( ' ' ) )
printf( "Space is a graphic character\n" );
printf("Space is not a graphic character\n");
if( isgraph( 'C' ) )
printf( "Character C is graph\n" );
Space is not a graphic character
Character C is graph
In the above example, this function is used to check space and "A". The Checking of the graphical representation has been made based on ASCII values.