How to convert uppercase letter to lowercase in c using preprocessor | SoloLearn: Learn to code for FREE!

+1

How to convert uppercase letter to lowercase in c using preprocessor

4/22/2020 11:50:19 AM

Harsh Bordhan Singh

1 Answer

New Answer

+3

The tolower() function takes an uppercase alphabet and convert it to a lowercase character. #include <stdio.h> #include <ctype.h> int main() { char c, result; c = 'M'; result = tolower(c); printf("tolower(%c) = %c\n", c, result); c = 'm'; result = tolower(c); printf("tolower(%c) = %c\n", c, result); c = '+'; result = tolower(c); printf("tolower(%c) = %c\n", c, result); return 0; } Output tolower(M) = m tolower(m) = m tolower(+) = +