Convert String Lowercase C Given Function Void Strlower String Would Convert Given String Q37085857

How do you convert a string to lowercase in C?

So given a function void strlower( *string): how would youconvert the given string to a lowercase string?


Answer


#include <stdio.h>void strlower(char *string) { int i = 0; while (string[i]) { if (string[i] >= ‘A’ && string[i] <= ‘Z’) { string[i] += 32; } i++; }}int main() {

OR
OR

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.