isspace function is used to check weather the character is white space or not.Let us see example program for it.
Example:
#include<stdio.h>
#include<conio.h>
#include<ctype.h>
main()
{
char ch;
clrscr();
printf("Enter any character: ");
scanf("%c",&ch);
if(isprint(ch))
{
printf("\nThis character is printable");
}
else
{
printf("\nThis character is not printable");
}
getch();
}
Example:
#include<stdio.h>
#include<conio.h>
#include<ctype.h>
main()
{
char ch;
clrscr();
printf("Enter any character: ");
scanf("%c",&ch);
if(isprint(ch))
{
printf("\nThis character is printable");
}
else
{
printf("\nThis character is not printable");
}
getch();
}