Table of Content

isupper function >> ctype.h >> header files in c Programming



isupper function >> ctype.h >> header files in c Programming

Syntax int isupper (int c)
Header File ctype.h
Return Value
  • Return non-zero if c is  Uppercase Letter
  • Return zero if c is not Uppercase Letter

Live Example :
void main()
{
char ch = 'A';

if( isupper(ch))
printf("nThis is Uppercase Character");
else
printf("nThis is not an Uppercase Character");
}

Output : 
This is Uppercase Character

Explanation of statement : if(isupper(ch))

  1. character ch is passed to function isupper
  2. if ch belongs to the set of Uppercase Characters [A-Z] then it returns non-zero value 
  3. otherwise it returns zero .
Note : 
  1. Positive non-zero value given to if block , will result in TRUE condition
  2. Zero value given to if block , will result in FALSE condition

Bookmark & Share