Question: Write a C + + program that produces a report from an input file. The program considers the words that occur in the input file.
Write aCprogram that produces a report from an input file.
The program considers the words that occur in the input file.
The C program file name must be zcxx where z is your Zid to yield an executable called z
The executable is invoked from the command line with a file name as argument:
z input.txt
your program should read all lines in the file
lines that start with the # character are ignored
punctuation characters like ; are ignored
your program should report things:
the number of words in the file
which word size occurs the most and how many times
the largest word length in the file and how often words of that length occur
all words that are of the longest word length in the file, not reporting duplicates
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
