Question: C++. Write a program that reads several lines from a data file and prints each word of the file on a separate line of an

C++. Write a program that reads several lines from a data file and prints each word of the file on a separate line of an output file followed by the number of letters in that word. Also print a count of the number of words in the file when done. Assume that words are separated by one or more blanks.

DO NOT count the period as one of the letters in the word. Use at least two functions. Use the following as your sample input data: from a file

Write a program that reads several lines from a data file and prints each word of the file on a separate line of an output file followed by the number of letters in that word. Also print a count of words in the file on the screen when done. Assume that words are separated by one or more blanks.

Sample output:

Write 5

a 1

program 7

The total number of words is 59

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!