Question: Write a Function based C++ program that reads text (character data) from the file. Words in the file are separated by white spaces. The program

Write a Function based C++ program that reads text (character data) from the file. Words in the file are separated by white spaces.

The program shall find the length of each word and save the lengths in an array.

You are strictly not allowed to use anything other than pointers and dynamic memory. One function should perform one functionality only.

(1) Open File

(2) Read only character data not integers

(3) Find length and save in an array

(4) Please Follow the Sample Output

Example

Text.txt: 47 A QUICK 12345 JUMPS OVER 50012 21212 LAZY 11111

Original text: A QUICK JUMPS OVER LAZY

Array of Lengths: 1 5 5 4 4

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!