char s1[] = "Upper/LOWER."; char s2[] = "mIXeD CaSe.."; /* copies s1 to s2, flips case of s2 */ dostr (ptr1,ptr2) char *ptr1,*ptr2; { unsigned char c; while (*ptr1 != 0) { c = *ptr1; if (c > 0x2F) { /* make sure it is not a special char */ *ptr2 = c ^ 0x20; /* xor flips bit */ } else { /* leave special chars alone */ *ptr2 = c; } ptr1++;ptr2++; } } main() { char c; printf("Before...\n"); printf("s1: '%s'\n",s1); printf("s2: '%s'\n",s2); dostr(s1,s2); printf("After...\n"); printf("s1: '%s'\n",s1); printf("s2: '%s'\n",s2); }