• Follow Us

Uppercase or Lowercase program in C

C Program to find if a given character is in Uppercase Letter or Lowercase Letter. So here we go: Variable used in this program: c: a character

Uppercase or Lowercase program in C

#include<stdio.h>
int main()
{
char c;
scanf("%c",&c);// scanning the alphabet
if(c>='a'&&c<='z')//comparision
{
printf("%c is lowercase letter",c);//printing the alphabet
}
else if(c>='A'&&c<='Z')
{
printf("%c is uppercase letter",c);
}
else
{
printf("%c is neither an uppercase or lowercase letter",c);
}
return 0;
}

Leave a Reply

Your email address will not be published. Required fields are marked *

Shopping cart