New course! Every coder should learn Generative AI!
Try a free lesson+ 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(+) = +