Skip to main content

Checking character

#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
char ch;
printf("Enter a character:");
scanf("%c",&ch);

if(ch>=65&&ch<=90)                                                         
printf("Entered character is an Uppercase character");
else if(ch>=97&&ch<=122)
printf("Entered character is a Lowercase character");
else if(ch>=48&&ch<=57)
printf("Entered character is a Number");
else
printf("Entered character is a Special Symbol");

getch();
}

Comments

Popular posts from this blog