Write a program to determine whether the character entered is a capital letter, a small case letter, a digit or a special symbol.

#include<stdio.h>
void main()
{
char ch;
printf("\nEnter the character: ");
scanf("%c",&ch);
if(ch >= 65 && ch <= 90)
printf("\n%c is uppercase",ch);
else if(ch >= 97 && ch <= 122)
printf("\n%c is lowercase",ch);
else if(ch >= 48 && ch <= 57)
printf("\n %c is a digit");
else
printf("\n %c is a special character");
}
Mukesh Rajput

Mukesh Rajput

I am a Computer Engineer, a small amount of the programming tips as it’s my hobby, I love to travel and meet people so little about travel, a fashion lover and love to eat food, I am investing a good time to keep the body fit so little about fitness also..

Post A Comment:

0 comments: