English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The tolower() function converts uppercase letters to lowercase characters.
If the parameter passed to the tolower() function is not an uppercase letter, it returns the same character passed to the function.
It isctype.h Defined in header files.
int tolower(int argument);
In C programming, characters are stored as integers. When a character is passed as a parameter, the corresponding ASCII value (integer) of the character is passed, rather than the character itself.
#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 Result
tolower(M) = m tolower(m) = m tolower(+) = +