program to check lower and upper case


Prev Tutorial Next Tutorial

program to check lower and upper case

  • islower(): Function is used to check character in lower case or not.
  • isupper(): Function is used to check character in upper case or not.
  • isdigit(): Function is used to check character in digit or not.

program to check lower and upper case

#include<stdio.h>
#include<conio.h>
#include<ctype.h>

void main()
{
char ch;
clrscr();
printf("Enter any charecter: ");
scanf("%c",&ch);
if(islower(ch))
{
printf("\n Lower case small letter");
}
else if(isupper(ch))
{
printf("Upper case capital letter");
}
else if(isdigit(ch))
{
printf("This number or digit");
}
else
{
printf("This is speciial symbol");
}
getch();
}

Output

Enter any character: c
Lower case small letter

Prev Tutorial Next Tutorial

Advertisements




Facebook Likes

Advertisements