141. Program to convert lower case to upper case of a given string
#include<stdio.h>
char ch[10],i;
void main()
{
printf("Enter a string : ");
scanf("%s",ch);
for(i=0;ch[i];i++)
{
if(ch[i]>='a' && ch[i]<='z')
{
ch[i]=ch[i]-32;
}
}
printf("%s",ch);
}
Comments
Post a Comment