next up previous
Next: About this document

centering17

Using the vi editor, write a C program on the Sun cluster that prompts the user for an input file name and an output file name. The input file should contain words (text) in any format. A word is defined as any string of characters separated from other strings of characters by one or more blanks, tabs, or newlines. The output file created by your program should contain the same words in the same order as the input file, but each line of the output file except that last should contain exactly 5 words. The last line of words in the output file will contain less than 5 words if the number of words in the input file is not a multiple of 5. The final line of the output file should contain a count of the total number of words in the input file.

More detailed specifications include:




next up previous
Next: About this document

Tim Wahls
Wed Mar 19 11:22:15 EST 1997