Function name : isspace
Header file : <ctype.h>
Function prototype : int isspace(int ch);
Function : Determine whether the character is a blank character
Parameters : int ch character to be checked
Return value : If ch is not a blank character, 0 is returned. If ch is a blank character, non-0 is returned.
Program example : Determine whether the entered character is a punctuation mark
#include<ctype.h>#include<stdio.h>intmain(){charchprintf(inputacharacter:);scanf(%c,&ch);if(isspace(ch)){printf(%cisspace.,ch);} else{printf(%cisnotspace.,ch);}putchar('n');return0;}
Running results:
inputacharacter:isspace.