Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>isupper() test for uppercase (macro)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 isupper()               Test for Uppercase (Macro)

 #include   <ctype.h>

 int        isupper;
 int        c;                           Integer value to be tested

    isupper() tests whether 'c' is an uppercase letter; that is, 'A' -
    'Z'.

       Returns:     Nonzero if the test is true and zero if it is false.
                    The result is undefined if 'c' is not an ASCII
                    character or EOF.

         Notes:     isupper() is a macro.

   -------------------------------- Example ---------------------------------

    The following statements test whether the character read from a file
    is uppercase.

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

           int ch;
           FILE *stream;

           main()
           {
               if ((stream = fopen("input.dat","r+"))!= NULL) {
                   while (!feof(stream)) {
                       if (isupper(ch = getc(stream)));
                         /* process character */
                   }
                   fclose(stream);
               }
           }


See Also: isalnum() isalpha() isascii() islower() isspace()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson