C Reference Upper case letter test: isupper()

The isupper() function returns a non-zero if its argument is an uppercase letter.
If the argument is not an uppercase letter, then zero is returned.

isupper() source code example:


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

int main()
{
	char a;
	scanf( "%c", &a );
	if( isupper(a) )
		printf( "This is an uppercase letter: %c\n", a );
	else
		printf( "This is NOT an uppercase letter: %c\n", a );
	return 0;
}

This entry was posted in C Reference ctype.h Functions. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site. Tweet This! Tweet This! or use to share this post with others.

Leave a Reply: