Popular Tutorials
Start Learning CCertification Courses
Created with over a decade of experience and thousands of feedback.
Python online compiler
JavaScript online compiler
SQL online compiler
Java online compiler
HTML online compiler
C online compiler
C++ online compiler
C# online compiler
PHP online compiler
Swift online compiler
Kotlin online compiler
TypeScript online compiler
Go online compiler
Rust online compiler
Scala online compiler
Dart online compiler
R online compiler
Ruby online compiler
C tolower()
The tolower() function takes an uppercase alphabet and convert it to a lowercase character.
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(+) = +
Did you find this article helpful?