The following table shows the range of ASCII values for various characters.

void main()
{
char a;
printf("\nEnter any character\n");
scanf("%c",&a);
if(a>=65&&a<=90)
printf("\nThe character is a capital letter");
else if(a>=97&&a<=122)
printf("\nThe character is a small case letter");
else if(a>=48&&a<=57)
printf("\nThe character is a number");
else
printf("\nThe character is a special symbol");
}
No comments:
Post a Comment