C isblank()

The isblank() function returns non-zero if ch is a character for which isspace() returns true and is used to separate words. Thus, for English, the blank characters are space and horizontal tab.

isblank() Syntax

Following is the syntax of the isblank() function :

int isblank(int ch);

isblank() Example

Following program checks each character read from stdin and reports the number of characters that separate words :

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

C Online Test

« Previous Chapter Next Function »