int isupper(int ch) : isupper « ctype.h « C / ANSI-C






int isupper(int ch)



//Declaration:  int isupper(int ch); 
//Return:       returns nonzero if ch is an uppercase letter; 
                otherwise zero is returned. 
  #include <ctype.h>
  #include <stdio.h>

  int main(void)
  {
    char ch;

    for(;;) {
      ch = getchar();
      if(ch == '.'){
          break;
      }
      if(isupper(ch)){
          printf("%c is uppercase\n", ch);
      }
    }

    return 0;
  }

         
/*
d
s
a
w
C
C is uppercase
.
*/ 
           
       








Related examples in the same category