Saturday, March 6, 2021

, , ,

Example program for isspace() in c

 The isspace() function in c programming used to check whether a character is a white-space character or not.

It return the non-zero integer if given argument to the isspace() in c is a white-space character, otherwise return 0.

Syntax For isspace() function in c: -

int isspace(int argument);

First check out the List of all white-space characters in C programming are:

isspace in c
Check white-space character

Example program for Check white-space character

#include <stdio.h>
#include <ctype.h>
int main()
    char c;
    int result;

    printf("Enter a character: ");
    scanf("%c", &c);
    result = isspace(c);

    if (result == 0)
        printf("Not a white-space character.");
        printf("White-space character.");

    return 0;


Post a Comment