islower - C ctype.h

C examples for ctype.h:islower

Type

function

From

<cctype> 
<ctype.h>

Description

Check if character is lowercase letter. A lowercase letter is any of: a b c d e f g h i j k l m n o p q r s t u v w x y z.

Prototype

int islower ( int c );

Parameters

Parameter Description
cCharacter to be checked, casted to an int, or EOF.

Return Value

A non zero value (i.e., true) if indeed c is a lowercase alphabetic letter. Zero (i.e., false) otherwise.

Demo Code


#include <stdio.h>
#include <ctype.h>
int main ()//from w w w  .  j  a v a  2  s  . co  m
{
  int i=0;
  char str[]="Test String.\n";
  char c;
  while (str[i])
  {
    c=str[i];
    if (islower(c)) c=toupper(c);
    putchar (c);
    i++;
  }
  return 0;
}

Related Tutorials