The following example of the isgraph() function can explains you the functioning of the isgraph() function :
Code:
#include <stdio.h>
#include <ctype.h>
char ch[] = {'C', 0x09, ' ', 0x7d};
#define SIZE sizeof( ch ) / sizeof( char )
void main()
{
int k;
for( k = 0; k < SIZE; k++ ) {
printf( "Char %c is %sa printable charactern",
ch[k],
( isgraph( ch[k] ) ) ? "" : "not " );
}
} Output:
Code:
Char C is a printable character
Char is not a printable character
Char is not a printable character
Char b is a printable character
Bookmarks