Headlines
Loading...
C Program to Print the status of a character.

C Program to Print the status of a character.

Print the status of a character.
Output :
Enter any character : 1
1 is either a special char or numeric.
Enter any character : a
a is a lower char alphabet.
Enter any character : A
A is an upper case alphabet.*/

#include<stdio .h="">
#include<conio .h="">
void main()
{
 char a;
 clrscr();

 printf("\nEnter any character : ");
 scanf("%c",&amp;a);
 if(a&gt;=65 &amp;&amp; a&lt;=90)
  printf("\n%c is an Uppercase Character",a);
 else if(a&gt;=97 &amp;&amp; a&lt;=122)
  printf("\n%c is a lower character",a);
 else if(a&gt;=48 &amp;&amp; a&lt;=57)
  printf("\n%c is either a Special Character or Numeric ",a);
 else
  printf("\n%c is a Special character",a);
 getch();
}

/* Output for 3 conditions are given below:
Enter any character : a

a is a lower character

Enter any character : A

A is an Uppercase Character

Enter any character : 1

1 is either a Special Character or Numeric</conio></stdio>
*** PLEASE checkout the Best deals from for top sites like Amazon, Flipkart etc ***