/*--------------------------------------------------------------------*/ /* uppercase.c */ /* Author: Bob Dondero */ /*--------------------------------------------------------------------*/ #include #include /*--------------------------------------------------------------------*/ static char cChar; /* Bad style. */ /*--------------------------------------------------------------------*/ /* Read a character from stdin, and write its uppercase equivalent to stdout. Return 0. */ int main(void) { cChar = (char)getchar(); /* Should check for error. */ cChar = (char)toupper((int)cChar); putchar((int)cChar); putchar('\n'); return 0; }