/*--------------------------------------------------------------------*/ /* uppercase.c */ /* Author: Bob Dondero */ /*--------------------------------------------------------------------*/ #include /*--------------------------------------------------------------------*/ enum {LOWER_TO_UPPER = -32}; static char cChar; /*--------------------------------------------------------------------*/ /* Read a letter from stdin, and write its uppercase equivalent to stdout. Return 0. */ int main(void) { scanf("%c", &cChar); /* Could call getchar() */ cChar += LOWER_TO_UPPER; /* Should call toupper() */ printf("%c\n", (int)cChar); /* Could call putchar() */ return 0; }