C examples for ctype.h:islower
function
<cctype> <ctype.h>
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.
int islower ( int c );
Parameter | Description |
---|---|
c | Character to be checked, casted to an int, or EOF. |
A non zero value (i.e., true) if indeed c is a lowercase alphabetic letter. Zero (i.e., false) otherwise.
#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; }