Write a program that reads several lines from a data file and prints each word o
ID: 3551827 • Letter: W
Question
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.
Use at least two functions, one main and one function call (Hint is using a pass by reference function)
Thee following is your sample input data from your input 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.
The total number of words is 59
Sample output in output file:
Write 5
a 1
program 7