Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

You are beginning to work on a problem that needs to output names in several formats along with the corresponding Social Security number. Therefore, you

You are beginning to work on a problem that needs to output names in several formats along with the corresponding Social Security number. Therefore, you need to create a C++ program which reads in a Social Security number, a first name, a middle name or initial, and a last name from the file inData.dat. The name is written to file outData.dat in three different formats:
Format 1: First name, middle name, last name, and Social Security number
Format 2: Last name, first name, middle name, and Social Security number
Format 3: Last name, first name, middle initial, and Social Security number
Format 4: Last name, middle initial, last name
Note: The social security number and name in three parts on file inData.dat, each separated by one or more whitespaces characters:
222-33-3543 Robert James Williams
Output: Write data in file outData.dat with proper format:
Robert James Williams 222-33-3543
Williams, Robert, James 222-33-3543
Williams, Robert, J. 222-33-3543
Robert J. Williams
Note: (paste the output of the code too in the answer thanks)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

3. Draw the state diagram for the following circuit. Derd Derc

Answered: 1 week ago

Question

5. Do you have any foreign language proficiency?

Answered: 1 week ago