C Program to Check input character is alphabet, digit or special character

program:
#include<stdio.h>
int main()
{
 char ch;
 printf("Enter any character\n");
 scanf("%c",&ch);
 if(ch>=65&&ch<=97||ch>=97&&ch<=122)
 {
 printf("It is alphabet");
 }
 else if(ch>=48&&ch<=57)
 {
 printf("It is digit");
 }
 else
 {
 printf("It is special symbol");
 }
}
output:
Previous Post Next Post