#include<stdio.h>
void strlwr(char *s);
main()
{
char a[50];
printf("Enter a string\n");
gets(a);
strlwr(a);
printf("The Converted string is\n");
puts(a);
}
void strlwr(char *s)
{
while(*s!='\0')
{
if(*s>=97&&*s<=122)
{ *s=*s-32;
}
s++;
}
}
Note: Need to be arranged in compiler after copied
OutPut:
Enter a string
Upper String
The Converted string is
UPPER STRING