The Wayback Machine - https://web.archive.org/web/20230209014306/https://www.geeksforgeeks.org/c-islower/
Skip to content
Related Articles
Open in App
Not now

Related Articles

C islower()

Improve Article
Save Article
  • Last Updated : 10 Nov, 2022
Improve Article
Save Article

islower() function is used to check whether a character is a lowercase letter or not. It is a standard library function defined in the <ctype.h> header file.

Syntax:

int islower(int ch);

Here, ch is the character to be checked.

Return Value:

  • If the character is a lowercase letter, the function returns a non-zero value.
  • If the character is not a lowercase letter, it returns 0.

Example:

Input: A
The given character is not a lowercase letter

Input: a
The given character is a lowercase letter

Input: 1
The given character is not a lowercase letter

C




// C program to demonstrate
// the islower() function
#include <ctype.h>
#include <stdio.h>
  
int main()
{
    char ch = 'g';
  
    if (islower(ch) != 0) {
        printf(
            "The given character is a lowercase letter.\n");
    }
    else {
        printf("The given character is not a lowercase "
               "letter.\n");
    }
  
    return 0;
}

Output:

The given character is a lowercase letter.
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!