/* Programmer: Greg Perkins Program: caps.c Class: CS 73 C/UNIX Due: 19 February 1998 This program accepts input from standard I/O and returns output to standard I/O. The program converts all lowercase alphabetic letters to uppercase. It does this using only bitwise operators to narrow the range of characters that are modified down to only the lowercase letters. This way, NO other characters are modified. */ #include int main() { int ch; while ((ch = getchar()) != EOF) { if ((ch & 0xE0) == 0x60) if (((ch & 0x1F) >= 0x01) && ((ch & 0x1F) <= 0x1A)) ch &= (~0x20); putchar(ch); } return (0); }