C isspace()

The isspace() function returns non-zero if ch is a white-space character, including space, horizontal tab, vertical tab, formfeed, carriage return, or newline character; otherwise zero is returned.

isspace() Syntax

Following is the syntax of the isspace() function :

int isspace(int ch);

isspace() Example

Following program checks each character read from stdin and reports all white-space characters :

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

C Online Test

« Previous Chapter Next Function »

Like/Share Us on Facebook 😋