Question: Write a program in C++ that reads the data from a text file and performs the following calculations and displays it on the screen. Note

Write a program in C++ that reads the data from a text file and performs the following calculations and displays it on the screen. Note that, you should make use of pointers and character arrays for referencing your text. All the manipulations on the text should be done using pointers and should not make use of any C String library functions.

Your program should prompt the user for a file name to process, read the text file, and display the following:

Number of words in it. A word is basically delimited by a space or a tab. (Note: consecutive spaces or tabs should be treated as one)

Number of characters in the file.

Number of the capitalized characters.

Number of the letters.

Number of digits.

Number of special characters.

Number of lines in the document

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!