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>_toupper() convert 'c' to uppercase (macro)</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 _toupper()              Convert 'c' to Uppercase (Macro)

 #include   <ctype.h>

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

    _toupper() converts 'c' to uppercase.  _toupper() is a macro.  It
    should be used only is you know that 'c' is lowercase, as result is
    undefined otherwise.

       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()

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