go to previous page   go to home page   go to next page

Answer:

Use two greater-than symbols:

E:>fileToCaps >>  someExistingFile.txt

Another New Problem

Universal Flow Chart, mostly

Now say that you wish to write a program that removes all characters from a text file except those allowed in C source files. This might actually be a practical program. Sometimes unexpected characters find their way into files, especially if you are cutting and pasting from power-point or word processing files. In order to make it clear what the program has done, replace bad characters with the sequence /* BAD */, a C comment which you will probably remove when editing the program.

The grain size of the problem is, again, characters. To make the problem interesting, use only putchar() for output.

The main logic of the program is shown in the above flowchart. But more work is needed for "process and output" . Which of the following structures should replace that box?

choice 1       choice 2       choice 3

QUESTION 13:

Which choice is best?