C Program For Alphabet Digit Whitespace graphic character

#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("Enter any character: ");
ch=getchar();
if((ch>='A'&&ch<='Z')||(ch>='a'&&ch<='z'))
printf("Alphabet");
else if((ch>='0'&&ch<='9'))
printf("Digit");
else if(ch==' '||ch=='\n'||ch=='\t')
printf("white space ");
else
printf("Graphic character");
getch();
}
Bhanu Namikaze

Bhanu Namikaze is an Ethical Hacker, Security Analyst, Blogger, Web Developer and a Mechanical Engineer. He Enjoys writing articles, Blogging, Debugging Errors and Capture the Flags. Enjoy Learning; There is Nothing Like Absolute Defeat - Try and try until you Succeed.

No comments:

Post a Comment