Tutorial Gateway

  • C
  • C#
  • Java
  • Python
  • SQL
  • MySQL
  • Js
  • BI Tools
    • Informatica
    • Talend
    • Tableau
    • Power BI
    • SSIS
    • SSRS
    • SSAS
    • MDX
    • R Tutorial
    • Alteryx
    • QlikView
  • More
    • C Programs
    • C++ Programs
    • Python Programs
    • Java Programs

islower in C Programming

by suresh

The C islower function is one of the Standard Library Functions available in this C programming language. This function used to check the given character is a lowercase alphabet or not. Let us see how to use islower in C Programming language with example.

C islower Function syntax

The C Programming islower is a built-in function present in the header file used to check whether the character is a lowercase alphabet or not. The Syntax of the C islower function is.

islower(char)

The above islower function will accept a single character as the parameter and check whether the given character is in lowercase or not. The islower function will return an integer value as output.

  • If the character inside the islower function is in lowercase, then it will return non zero value
  • If the character inside the islower function is not in lowercase, it will return 0

islower in C Programming Example

The C islower method used to find whether the given character is a lowercase character or not.

This C program allows the user to enter any character, and check whether the character is between a to z using the islower function.

//Example for islower in C Programming
#include <stdio.h>
#include <ctype.h>

int main()
{
    char ch;
    printf("Please Enter Any Lowercase Character: \n");
    scanf("%c", &ch);

    if(islower(ch))
    {
      printf("\n You have entered a Lowercase Character");         
    }
    else
    {
      printf("\n %c is not a Lowercase Alphabet", ch);
      printf("\n I request you to enter Valid Lowercase Character");	
    }
}

OUTPUT

islower in C Programming 1

Let me enter the Uppercase letter

islower in C Programming 2

ANALYSIS

First, we declared a character variable called ch

char ch;

The following statement will ask the user to enter any character. And then we are using the C Programming scanf to assign the user entered a character to ch variable

printf("Please Enter Any Lowercase Character: \n");
scanf("%c", &ch);

In this next line, we added the If Statement to check whether the character is between ‘a’ and ‘z’ or not using C islower function. If the condition is True, then the following statement will print

printf("\n You have entered a Lowercase Character");

If the above condition is FALSE, the given character is not a lowercase Alphabet. So, it will print below statements

printf("\n %c is not a Lowercase Alphabet", ch);
printf("\n I request you to enter Valid Lowercase Character");

The above code will definitely check whether the given character is a lowercase character or not, but what if we enter the numeric value

islower in C Programming 3

TIP: Please refer C Program to check whether the Character is Lowercase or Not article. It helps you know how to check whether the character is lowercase or not without using the islower function.

Placed Under: C Programming

  • C Comments
  • C Escape Sequence
  • C Programming Operators
  • C Arithmetic Operators
  • C Assignment Operators
  • C Bitwise Operators
  • C Conditional Operator
  • C Increment & Decrement Optr
  • C Logical Operators
  • C Relational Operators
  • C Sizeof Operator
  • C If Statement
  • C IF ELSE Statement
  • C Else If Statement
  • C Nested If
  • C Break Statement
  • C Continue Statement
  • C Goto Statement
  • C Switch Case
  • C For Loop
  • C While Loop
  • C Do While Loop
  • C Arrays
  • C Two Dimensional Array
  • C Multi Dimensional Array
  • C String
  • C Structures
  • C Nested Structures
  • C Array of Structures
  • C Structures and Functions
  • C Union
  • C Structure & Union differences
  • C Pointers
  • C Pass Pointers to Functions
  • C GETS
  • C fgets Function
  • C fgetc
  • C fputs function
  • C fputc
  • C Functions
  • C Types of Functions
  • C Pass Array to Functions
  • Call By Value & Call By Reference
  • C Recursion
  • C Program Examples
  • C Tutorial
  • C# Tutorial
  • Java Tutorial
  • JavaScript Tutorial
  • Python Tutorial
  • MySQL Tutorial
  • SQL Server Tutorial
  • R Tutorial
  • Power BI Tutorial
  • Tableau Tutorial
  • SSIS Tutorial
  • SSRS Tutorial
  • Informatica Tutorial
  • Talend Tutorial
  • C Programs
  • C++ Programs
  • Java Programs
  • Python Programs
  • MDX Tutorial
  • SSAS Tutorial
  • QlikView Tutorial

Copyright © 2021 | Tutorial Gateway· All Rights Reserved by Suresh

Home | About Us | Contact Us | Privacy Policy