Convert Upper to Lower Case Alphabets & Vice-versa , Using Function

/* Write a program to Convert Upper to Lower Case Alphabets & Vice-versa using Function */

#include<stdio.h>
#include<conio.h>
void main()
{
void change (char);
char letter;
clrscr();
printf("\n Enter a letter");
scanf("%c",&letter);
printf("\n You have Enter",letter);
change(letter) ;
getch();
}

void change(char ch)
{
if(ch>='a'&&ch<='z')
{
   printf("\n You have entered Lower case letter =%c",ch);
   ch = ch - 32 ;
   printf("\n The Upper case letter is =%c",ch);
}
 
else if(ch>='A' && ch<='Z')
{
   printf("\n You have entered Upper case letter");
   ch = ch + 32 ;
   printf("\n The Lower case letter is =%c",ch);
}
 
else
{
   printf("\n WRONG INPUT ");
}

}

Who's online

We have 16 guests and no members online

About Us

Harsimran Singh

Hello

This website is a special gift for Programming Lovers , which want to learn basic Programming Languages and want to develop there skills Read More....

Our work

Find Us

This email address is being protected from spambots. You need JavaScript enabled to view it.

Harsimran Singh(Facebook)

Harsimran Singh(about.me)

Harsimran Singh(G+)