English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
islower() function checks if a character is a lowercase letter (a-z).
int islower( int arg );
The function islower() takes a single parameter in the form of an integer and returns the value of type int.
Even though islower() accepts integers as parameters, the character is passed to the function. Internally, the character is converted to its ASCII value for checking.
It is<ctype.h>Defined in the header file.
Return value | Description |
---|---|
Non-zero number (x > 0) | The parameter is a lowercase letter. |
0 | The parameter is not a lowercase letter. |
#include <stdio.h> #include <ctype.h> int main() { char c; c='t'; printf("The return value when '%c' is passed to islower():%d", c, islower(c)); c='D'; printf("\nThe return value when '%c' is passed to islower():%d", c, islower(c)); return 0; }
Output result
The return value when 't' is passed to islower(): 2 Passing 'D' to islower() returns: 0
Note: WhenWhen passing lowercase letters to the islower() function on the system, different integer values may be obtained. However, when any character other than a lowercase character is passed to islower(), it always returns 0.