# Uppercase, Lowercase or special character

## Write a C program to find character is a Uppercase, Lowercase or special character

• A character is said to be in uppercase if it is in capital letter of English language.
• A character is said to be in lowercase if it is in small letter.
• If A character is not an alphabet and not a number rather than character is a special character.
• And all character have an ascii value .Now we compute a C program to check whether an entered character is in uppercase, lowercase and special character .

We know that the ASCII value of character’s 0 to 225 .In which lowercase alphabet ‘a’ to ‘z’ have a ‘97’ to ‘122’ ASCII value. And uppercase alphabet ‘A’ to ‘Z’ have a ‘65’ to ‘90’ ASCII value. And other special character have ASCII value rather than alphabet. So the program displays whether the entered character is lowercase alphabet or uppercase alphabet and special character by checking its ASCII value.

### Working:-

Step 1:  Insert a character (by the user)

Step 2: Check whether the character lies between A and Z, if true, print “uppercase”

Step 3: Check whether the character lies between a and z, if true, print “lowercase”

Step 4: Check whether the character lies between 0 and 9, if true, print “not a character it is a number”

Step 5: All other condition are false ,print ” it is a spacial character”

Step 6:stop.

### C program:-

`//C program#include<stdio.h>int main(){      //for initialize of character          char c;          //to take user input            printf("Enter any character : ");         scanf("%c",&c);     //to find true of upper case value.        if(c>='A' && c<='Z')             printf("character is  an upper case");             //to check of lowercase character        else if(c>='a' && c<='z')            printf("character is a lower case");           //to check it is not a character       else if(c>='0'&& c<='9')           printf("it is not a character");       //all condition false than         else          printf("character is a special character");       return 0;}`

### Output:-

`Enter any character :  Acharacter is an upper caseEnter any character : acharacter is a lower caseEnter any character : 9it is not a characterEnter any character @character is a special character`