26.(C) Finding Upper and lower case
#include <stdio.h>
int main()
{
// 97-122=a-z ASCII values
// 65-90=A-Z ASCII values
char ch;
printf("Enter the character\n");
scanf("%c", &ch);
if (ch >=65 && ch <= 90)
//if(ch>='A' && ch<='Z')
{
printf("It is Uppercase\n");
}
else {
printf("It is lowercase\n");
}
return 0;
}
Comments
Post a Comment