islower in c

If you want convert islower in c then read this blog post.

What is islower in c programming?

islower function checks whether a given character is in lowercase or not.

This function is defined in ctype.h header file.

Prototype

int islower(int a);

Parmeters of islower in c

islower function takes character as input parameter in c. The character is converted into ASCII value.

Return value of islower in c

islower function returns nonzero number if passed character is in lowercase otherwise zero.

Example program for islower in c

Example 1

#include<stdio.h>
#include<ctype.h>
int main()
{
  char a='e';
  printf("\n\n\tPassed value is %d \n\n",islower(a));
  return 0;
} 
Example 1 for islower in c programming

Code explanation

islower function is called to check whether the given input character is in lowercase or not. The result is being printed onto the console.


Example 2

#include<stdio.h>
#include<ctype.h>
int main()
{
  char a='S';
  printf("\n\n\tPassed value is %d \n\n",islower(a));
  return 0;
} 
Example 2 for islower in c

Code explanation

First, we have to include the stdio.h header and ctype.h header files in order to use islower function to perform the operation. That we have done using #include macro.

Then we define a character variable.

We pass it to islower function and print the result on console.

islower() Man page


Difference between islower and tolower in c

islower function checks whether a character is in lowercase or not. tolower is a c library function that converts given uppercase letters to lowercase letters.

islower function returns a non-zero number if a given character is in lowercase letter otherwise zero. tolower function returns converted lowercase letters as an integer which is then cast to char.

Prototypes are as follows

int islower(int y);

int tolower(int x);
islower in ctolower in c
Checks a given character is in lowercase or not.Converts uppercase letters to lowercase letters.
Checks a given character is in lowercase or not.
int islower(int x);int tolower(int x);

Difference between islower and isupper in c

islower function checks whether a character is in lowercase or not. isupper function checks whether a character is in uppercase or not.

Prototypes are as follows

int islower(int y);

int isupper(int x);
islower in cisupper in c
Checks a given character is in lowercase or not.Checks a given character is in uppercase or not.
int islower(int y);int isupper(int x);

People also ask for

What is islower in c?

islower function checks whether a character is in lowercase or not. It is defined in ctype.h header file.