How to use isupper() function to check whether a character is an uppercase alphabetic letter in C

1 Answer

0 votes
#include <stdio.h>
#include <ctype.h>
 
int main(void)
{
    char s[] = "Unreal Engine 4 - DirectX 12";
	int i = 0;
	
	while (s[i])
	{
		if (isupper(s[i])) 
			printf ("%c is uppercase\n", s[i]);
		i++;
	}
    return 0;
}
 
  
/*
    
run:
    
U is uppercase
E is uppercase
D is uppercase
X is uppercase

*/

 



answered Jan 28, 2016 by avibootz
...