Header file:
ctype.h
Synopsis:
int isspace (int input)
Description:
Checks whether the given input is a white space or not.
Standard White Space Characters:
’ ’ space
’\f’ formfeed
’\n’ newline
’\r’ carriage return
’\t’ horizontal tab
’\v’ vertical tab
Return Value:
TRUE(a non-zero value) on success
0 on failure.
isspace function C example:
#include<stdio.h>
#include<ctype.h>
int main() {
char c;
printf("Enter your input:");
c = getchar();
if (isspace(c))
printf("Given input is a white space character\n");
else
printf("not a white space character\n");
printf("Return value from isspace: %d\n", isspace(c));
return 0;
}
#include<ctype.h>
int main() {
char c;
printf("Enter your input:");
c = getchar();
if (isspace(c))
printf("Given input is a white space character\n");
else
printf("not a white space character\n");
printf("Return value from isspace: %d\n", isspace(c));
return 0;
}
Output:
Enter your input:
Given input is a white space character
Return value from isspace: 8192
Given input is a white space character
Return value from isspace: 8192
Do you need Finance? Are you looking for Finance? Are you looking for finance to enlarge your business? We help individuals and companies to obtain finance for business expanding and to setup a new business ranging any amount. Get finance at affordable interest rate of 3%, Do you need this finance for business and to clear your bills? Then send us an email now for more information contact us now via (financialserviceoffer876@gmail.com) whats-App +918929509036 Dr James Eric Finance Pvt Ltd Thanks
ReplyDelete