- The C Standard Library
- C Library - Home
- C Library - <assert.h>
- C Library - <ctype.h>
- C Library - <errno.h>
- C Library - <float.h>
- C Library - <limits.h>
- C Library - <locale.h>
- C Library - <math.h>
- C Library - <setjmp.h>
- C Library - <signal.h>
- C Library - <stdarg.h>
- C Library - <stddef.h>
- C Library - <stdio.h>
- C Library - <stdlib.h>
- C Library - <string.h>
- C Library - <time.h>
- C Standard Library Resources
- C Library - Quick Guide
- C Library - Useful Resources
- C Library - Discussion
- C Programming Resources
- C Programming - Tutorial
- C - Useful Resources
C library function - tolower()
Description
The C library function int tolower(int c) converts a given letter to lowercase.
Declaration
Following is the declaration for tolower() function.
int tolower(int c);
Parameters
c − This is the letter to be converted to lowercase.
Return Value
This function returns lowercase equivalent to c, if such value exists, else c remains unchanged. The value is returned as an int value that can be implicitly casted to char.
Example
The following example shows the usage of tolower() function.
#include <stdio.h> #include <ctype.h> int main () { int i = 0; char c; char str[] = "TUTORIALS POINT"; while( str[i] ) { putchar(tolower(str[i])); i++; } return(0); }
Let us compile and run the above program to produce the following result −
tutorials point
ctype_h.htm
Advertisements