/* Program begins with the string "Cs" saves it in a relatively large char array, converts all letters to upper case edits the string to yield "CS FOR ALL" Throughout, printing is accomplished with %s format */ #include #include int main () { /* save "Cs" string in 14-character array */ char text [14] = "Cs"; printf ("original string: %s\n", text); /* convert all letters to upper case */ int i; for (i = 0; i < 14; i++) text[i] = toupper (text[i]); printf ("capitalized string: %s\n", text); /* add " FOR ALL" to string */ for (i = 0; i < 8; i++) text[i+2] = " FOR ALL"[i]; /* place NULL character at end */ text[10] = 0; printf ("final string: %s\n", text); return 0; }