_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");
         }

Seealso:



This page last updated on Fri Nov 30 10:48:32 MSK 2001
Copyright © 1992-2001, Vitaly Filatov, Moscow, Russia
Webmaster