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 Lowercase 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 Lowercase Letters");
else
  printf("\nCharacter is Not Lowercase Letters");

getch();
}

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

if(ch>=97 && ch<=122)
  printf("\nCharacter is Lowercase Letters");
else
  printf("\nCharacter is Not Lowercase Letters");

getch();
}

Output :
Enter The Character : a
Character is Lowercase Letters