strlwr in c

strlwr() function in c

The strlwr(string) function returns the string characters in the lowercase. It accepts the string as argument to convert in the lowercase

Syntax

char *strlwr(char *str);

str: str represents the string which we want to convert into lowercase.

Returns: It will returns the Edited string obtained after converting the characters of the already given string str to lowercase.

#include<stdio.h>
#include<conio.h>
int
main()
{
char str[20];
printf("Enter the string to convert in lowercase");
gets(str);
printf("\nThe original string =%s",str);
printf("\nAfter convert in lowercase string =%s",strlwr(str));
return 0;
}

output:
Enter the string to convert in lowercase
The original string =GOJAVAPoint.com After convert in lowercase string =programmingknow.com

#include<stdio.h>
#include<string.h>
int main()
{
char str[ ] = "PROGRAMMINGKNOW IS THE BEST PLATFORM";
// here convert the given string into lowercase.
printf("%s\n",strlwr (str));
return 0;
}