UPPERCASE TO LOWERCASE
#include<stdio.h>
#include<conio.h>
#include<string.h>
int main()
{ clrscr();
int i; char st[10];
printf(“Enter 1 word in uppercase “);
scanf(“%s”,st);
for(i=0;i<=strlen(st);i++)
{ if(st[i]>=65 && st[i]<=92) // ascii value of A=65, a=97
{ st[i]=st[i]+32; } }
printf(“\nThe word in the Lowercase will be = %s”,st);
getch();
return 0;
}
LOWERCASE TO UPPERCASE
#include<stdio.h>
#include<conio.h>
#include<string.h>
int main()
{ clrscr(); int i;
char st[10];
printf(“Enter 1 word in lowercase “);
scanf(“%s”,st);
for(i=0;i<=strlen(st);i++)
{ if(st[i]>=97 && st[i]<=122)
{ st[i]=st[i]-32; }
}
printf(“\nThe word in the uppercase will be = %s”,st);
getch();
return 0;
}