709. To Lower Case
Question 709
Input: "Hello"
Output: "hello"Input: "here"
Output: "here"Input: "LOVELY"
Output: "lovely"Answer By C
char* toLowerCase(char* str) {
int i = 0;
while(str[i]){
if(str[i] >= 'A' && str[i] <= 'Z'){
str[i] += 'a' - 'A';
}
i++;
}
return str;
}Last updated