You may  extend either part A (using character arrays) or part B (using strings) that you began for the in-class assignment 1 to do parts C and D below.



C. Your program has an array that holds the words, as well as an integer array of counts. Write a function called computestats, that accepts the word array and the integer array as parameters and prints out how many times each of those words occur in the file data.txt


When you return from this function, the array of counts should hold a count for each word.  For example, since the word co-requisite never occurs, if your integer array is called counts, then counts[1] will hold a 0.  For this part, you may assume only exact matches.


D. Modify part C above so that you take case (upper or lower), apostrophes, and the plural letter s into account.  For example, for this part, if you see the word courses, it should count as having seen the word course.  Similarly prerequisite, (on line 3 of the data file) which is the word followed by a comma, should match prerequisite.