C Data Type Functions - C isspace






Determines if a character is white space.

Prototype

int isspace( int ch );

Parameters

ch - character to classify

Return value

Non-zero value if the character is a whitespace character, zero otherwise.

Example


#include <stdio.h>
#include <ctype.h>
#include <limits.h>
 
int main(void){
    for (int ndx=0; ndx<=UCHAR_MAX; ndx++)
        if (isspace(ndx)) printf("0x%02x\n", ndx);
}

The code above generates the following result.