I really need some help with this hw assignment. I'm not sure how to write these fuctions...

Write a program to process text files. The program should read a text file and output the data in the file as is. The program should also output the number of words, number of lines, and the number of paragraphs.

You must write and use the following functions.

a) initialize: This function initializes all the variables of the function main

b) processBlank: This function reads and writes blanks. Whenever it hits a nonblank(except whitespace characters), it increments the number of words in a line. The number of words in a line is set back to zero in the function updateCount. The function exits after processing the blanks.

c) copyText: This function reads and writes the nonblank characters. Whenever it hits a blank, it exits.

d) updateCount: This function takes place at the end of each line. It updates the total word count, increments the number of lines, and sets the number of words on a line back to zero. If there are no words in a line, it increments the number of paragraphs. One blank line(between paragraphs) is used to distinguish paragraphs and should not be counted with the number of lines.

e) printTotal: This function ouputs the number of words, number of lines, and number of paragraphs.

Your program should read data from a file and send output to a file. Do not use any global variables. Use the appropriate parameters to pass values in and out of the functions described above.

Any help would be greatly appreciated. Thanks.