C isgraph()

The isgraph() function returns non-zero if ch is any printable character other than a space; otherwise zero is returned. For ASCII environments, printable characters are in the range 0x21 through 0x7E.

isgraph() Syntax

Following is the syntax of the isgraph() function :

int isgraph(int ch);

isgraph() Example

Following program checks each character read from stdin and reports all printable characters :

void main()
	char ch;
	for(; ;)
		ch = getchar();
			printf("%c is printable\n", ch);
		if(ch == '.')

C Online Test

« Previous Chapter Next Function »

Like/Share Us on Facebook 😋