Answers for "how to define a lower case in c"

C
3

convert to lowercase in c

/* Use the tolower Function to Convert String to Lowercase in C */
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>

int main(){
    char *str = "THIS STRING LITERAL IS ARBITRARY";

    printf("%sn", str);
    for (size_t i = 0; i < strlen(str); ++i) {
        printf("%c", tolower((unsigned char) str[i]));
    }
    printf("n");

    exit(EXIT_SUCCESS);
}
Posted by: Guest on August-24-2021

Code answers related to "how to define a lower case in c"

Code answers related to "C"

Browse Popular Code Answers by Language