Check whether it is alphabet and if yes then change the case of alphabet

#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("enter a charter:");
ch=getch();
if(isalpha(ch))
{
printf("\n it is an alphabet");
if(isupper(ch))
{
printf("\nit in uppercase\n");
putchar(tolower(ch));
}
else
{
printf("\nit is in lower case");
putchar(toupper(ch));
}
}
else
printf("\n not an alphabet");
getch();
}

Comments

  1. This seems to be great... very goos work Mr Rohan Sarda.

    just check http://dhruvdave.com

    ReplyDelete

Post a Comment