//to check if entered character is uppercase or lowercase
//alphabet or is a digit
main()
{
char a;
printf("Enter the character\n");
a=getchar();
if(isalpha(a))
{
printf("It is a Alphabet\n");
if(isupper(a))
{
printf("It is in upper case\n");
}
else
{
printf("It is in lower case\n");
}
}
else if(isdigit(a))
{
printf("It is a digit\n");
}
system("pause");
}
No comments:
Post a Comment