[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
_toupper()               Convert 'c' to Uppercase

 #include   <ctype.h>

 int        _toupper(c);
 int        c;                           Character to be converted

    The _toupper() macro converts 'c' to uppercase.  It should only to be
    used when 'c' is known to be lowercase.  The result of _tolower() is
    undefined if 'c' is not a lowercase letter.

    Returns:    The converted character 'c'.  There is no error return.

      Notes:    Use toupper() to convert characters that are not
                necessarily lowercase letters.

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

    The following statements convert 'string' to uppercase if needed.

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

         char string[15] = "alphabet";
         int x;

         main()
         {
             for (x = 0; x < strlen(string); x++)
                 printf("%c",_toupper(string[x]));
             printf("\n");
         }

See Also: toupper() isupper() islower()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson