When a character is entered through the keyboard , write a program to determine whether the character entered is a upper case letter, a small case letter, a digit or a special symbol. ASCII values for various characters.

i) A-Z   65-90 ii) a-z  97-122  iii) 0-9  48-57    
iv) special symbol 0-47, 58-64, 91-96 , 123-127

source file name: chars.C
#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("\n enter any character: ");
scanf("%c",&ch);

if(ch>=65 && ch<=90)
printf("\n given char is Upper case");
else if(ch>=97 && ch<=122)
printf("\n given char is Lower case");
else if(ch>=48 && ch<=57)
printf("\n given char is a Digit");
else if((ch>=0 && ch<=47) || (ch>=58 && ch<=64)|| (ch>=91 && ch<=96) || (ch<=123 && ch<127) )
printf("\n given char is Special Symbol ");
getch();
}

output:
1. enter any character: K
given char is Upper case

2. enter any character: #
given char is Special Symbol