C Program to find sum of two numbers



#include<stdio.h>
#include<conio.h>
void main(){
char character;
clrscr();
printf("Enter any character:");
scanf("%c",&character);
if(character>=65&&character<=90)
{
printf("\nCharacter '%c' is a Uppercase letter.",character);
}
if(character>=92&&character<=122)
{
printf("Character '%c' is a Lowercase letter.",character);
}
getch();
}

Explanation:

The above program will check the given character is in lowercase or in upper case. If the character's ascii value is in between the 65 to 90 then the character is in uppercase and if character's ascii value is in the range of 92 to 122 then the character is in lower case. We can understand the process of this program by given example:

character=A
ascii value of character is 65 so
character>=65 && character<=122 ,True
so the character A is a uppercase character.
The output of the above program is given below:

Output:

c program