How to determines whether a character is a uppercase in C

1 Answer

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

int main(void)
{   
	char ch = 'A';
	if (isupper(ch))
		printf("yes\n");
	else
		printf("no\n");

	ch = 'a';
	if (isupper(ch))
		printf("yes\n");
	else
		printf("no\n");

    return 0;
}

   
/*
run:

yes
no

*/

 



answered Dec 7, 2016 by avibootz

Related questions

1 answer 195 views
1 answer 172 views
1 answer 154 views
1 answer 181 views
1 answer 214 views
1 answer 186 views
...