Question: Write a C++ program that reads in from a file that contains full names of employees of ABC Company. The file is formatted in the

 Write a C++ program that reads in from a file that

Write a C++ program that reads in from a file that contains full names of employees of ABC Company. The file is formatted in the following way: John Jacob Schmidt Jane Marry Roe The program should take each name from the file into a string and display each part of the name together with its length separately to screen in the following format Schmidt, John J. First name John (4) Middle name Jacob (5) Last name: Schmidt (7) Roe, Jane M. First name: Jane (4) Middle name Marry (5) Last name: Roe (3) For the first line of the file, you should read John Jacob, and Schmidt into three string variables. His full name, Schmidt, John J should be stored in another string variable for output As there are unknown numbers of names/lines, you need to choose appreciated loop statement in this program. Please be noted that the middle is the initial with a dot in output

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!