C program to change Uppercase String to Lowercase String without using built-in function.

#include<stdio.h>
#include<string.h>
int main()
{
char str[300];
int i=0;
printf("Enter Uppercase String:");
fgets(str,300,stdin);
while(str[i]!='\0')
{
if(str[i]>='A' && str[i]<='Z')
{
str[i]=str[i]+32;
}
else
{
str[i]=str[i];
}
i++;
}
printf("Then Lowercase String=%s",str);
return 0;
}

***INPUT && OUTPUT***



Post a Comment

0 Comments