2.) Program to check the character is upper case or lower case. : )
// program to check the character is uppercase or lower case.
#include <stdio.h>
int main()
{
char ch;
printf("Enter the character lower as well upper case:\n");
scanf("%c", &ch);
if (ch >= 65 && ch <= 90)
{
printf("%c is the upper case character", ch);
}
else if (ch >= 97 && ch <= 122)
{
printf("%c is the lower case character", ch);
}
return 0;
}
Output:
Enter the character lower as well upper case:
Z
Z is the upper case character.
***** THANK YOU *****
Comments
Post a Comment