You are here : Cctype.hislower

islower() - ctype.h

The C library function int islower(int c) checks whether the passed character is a lowercase letter.
This function returns a non-zero value(true) if c is a lowercase alphabetic letter else, zero (false).


Syntax

int islower(int c);


Example

#include <stdio.h>
#include <ctype.h>

int main()
{
   int var1 = 'Q';
   int var2 = 'q';
   int var3 = '3';
    
   if( islower(var1) )
   {
      printf("var1 = |%c| is lowercase character\n", var1 );
   }
   else
   {
      printf("var1 = |%c| is not lowercase character\n", var1 );
   }
   
   if( islower(var2) )
   {
      printf("var2 = |%c| is lowercase character\n", var2 );
   }
   else
   {
      printf("var2 = |%c| is not lowercase character\n", var2 );
   }
   
   if( islower(var3) )
   {
      printf("var3 = |%c| is lowercase character\n", var3 );
   }
   else
   {
      printf("var3 = |%c| is not lowercase character\n", var3 );
   }
   
   return(0);
}


Output / Return Value

var1 = |Q| is not lowercase character
var2 = |q| is lowercase character
var3 = |3| is not lowercase character


Limitations


Alternatives / See Also


Reference