C tolower function changes the letter to lowercase
Syntax
C tolower
function has the following syntax.
int tolower(int ch);
Header
C tolower
function is from header file ctype.h
.
Description
C tolower
function returns the lowercase equivalent of ch
if
ch is a letter or ch is returned unchanged.
Example
The following changes the letter Q from uppercase to lowercase and
use putchar
to output the result to the screen.
#include <ctype.h>
#include <stdio.h>
/* w w w.ja v a 2 s .co m*/
int main(void){
putchar(tolower('Q'));
}
The code above generates the following result.