If the arguments passed to the tolower() function is other than an uppercase alphabet, it returns the same character that is passed to the function.
It is defined in ctype.h header file.
Function Prototype of tolower()
int tolower(int argument);
The character is stored in integer form in C programming. When a character is passed as an argument, corresponding ASCII value (integer) of the character is passed instead of that character itself.
Example: How tolower() function works?
#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(+) = +