About Me

My photo
Raipur, Chhattisgarh, India
Hi , I am Amit Thakur. I have worked as a QA Engineer for two years and as a Java Developer for one year in NIHILENT TECHNOLOGIES PVT. LTD., Pune.Currently I am working as DEAN (Research & Development) in Bhilai Institute of Technology, Raipur.

Wednesday, September 4, 2013

C Program to Check Whether Character is Uppercase or Not without using Library function

#include<stdio.h>
void main()
{
char ch;
int i;
clrscr();
printf("\nEnter The Character : ");
scanf("%c",&ch);

if(ch>='A' &&ch<='Z')
  printf("\nCharacter is Uppercase Letters");
else
  printf("\nCharacter is Not Uppercase Letters");

getch();
}

Way 2 :
#include<stdio.h>
void main()
{
char ch;
int i;
clrscr();
printf("\nEnter The Character : ");
scanf("%c",&ch);

if(ch>=65 && ch<=90)
  printf("\nCharacter is Uppercase Letters");
else
  printf("\nCharacter is Not Uppercase Letters");

getch();
}

Output :
Enter The Character : A
Character is Uppercase Letters