In this tutorial you will learn about the C Program to Check Lower Upper Case and its application with practical example.
In this tutorial, will learn to find entered character is an Uppercase or in a lower case using C programming language.
Before starting with this tutorial we assume that you are best aware of the following C programming topics:
- Basic Programming
- looping statements
- For Loop
- If else statement.
- Basic input/output.
What Is Upper and lower case.
Uppercase letters are capital letters. they usually signal reader that something is important or significant in a Text.Uppercase letters represent the beginning of a sentence or a proper noun.
uppercase letters: A B C D E F G H I J K L M N O P Q R S T U V W X Y Z.
lowercase letters In writing, most letters are lowercase. Lowercase letters are all letters that do not begin a sentence or refer to a proper noun.Each word in this sentence other than the first word is written in lowercase.
lowercase letters: a b c d e f g h i j k l m n o p q r s t u v w x y z.
C Program to Check Lower Upper Case
char ch; //declaring varibles
printf("enter any character ");
scanf("%c",&ch); //taking values
if (ch >= 'A' && ch <= 'Z') // checking upper case condition
printf(" is an UpperCase character\n");
if (ch >= 'a' && ch <= 'z') // checking lowercase condition
printf("is an LowerCase character\n");
printf(" is not an aplhabetic character\n"); // if given value in not a character