PROGRAM TO CONVERT A STRING FROM LOWER TO UPPER CASE

/*PROGRAM TO CONVERT A STRING FROM LOWER TO UPPER CASE*/
#include<stdio.h>
#include<conio.h>
void main()
{
int temp,len,i;
char a[10];
clrscr();
printf(“Enter any string in lower case: “);
gets(a);
len=strlen(a);
for(i=0;i<len;i++)
{
if(a[i]>=97 && a[i]<=122)
a[i]=a[i]-32;
}
printf(“After conversion upper string is: %s”,a);
getch();
}

Leave a Reply

Your email address will not be published. Required fields are marked *