Use C language
bool isupper(char c): This function returns true if the character in c is an uppercase character between A and Z (inclusive). Note that the C standard library function isupper() both accepts and returns an int, not char or bool, but the behavior is equivalent.
void strlower(char str[]): Change all uppercase ASCII characters in the C string str to their lowercase equivalents. For example, A would become a, and G would become g. All other characters in str remain unchanged.
`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
#include <stdio.h>
#include <stdbool.h>
#include<string.h>
bool isupper(char c)
{
if(c>='A'&&c<='Z')
return true;
return false;
}
void strlower(char str[])
{
int i;
for(i=0;i<strlen(str);i++)
{
if(isupper(str[i]))
{
str[i]=str[i]-'A'+'a';
}
}
}
int main()
{
int i;
char str[]="HelLLo WoRld";
strlower(str);
printf("%s",str);
return 0;
}
Kindly revert for any queries
Thanks.
Get Answers For Free
Most questions answered within 1 hours.