Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I have a C++ question, I've already posted this question twice but they never follow the direction of the question. The bold text is the

I have a C++ question, I've already posted this question twice but they never follow the direction of the question. The bold text is the most important part. Thank you.

Question:

You are to write a C++ program that prompts the user for a first name, middle name, and last name. Each name string is to be saved in its own character array. Then you should create a "full name" string by copying the last name to a fourth array, and concatenating a comma, the first and middle names (be sure when you build the full name string to separate each name string with some whitespace). Once you have the full name in its own buffer, you should also display the total number of characters in the full name (not counting the blank space separators).

Expect output:

1st try) Please enter your first name: Dean

Do you have a middle name?(Y/N): y

Please enter your middle name: William

Please enter your last name: Lee

Your full name is: Lee, Dean William

The total number of characters in your name is: 14

2nd try) Please enter your first name: Dean

Do you have a middle name?(Y/N): n

Please enter your last name: Lee

Your full name is: Lee, Dean

The total number of characters in your name is: 7

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

Recommended Textbook for

Databases Illuminated

Authors: Catherine M. Ricardo, Susan D. Urban, Karen C. Davis

4th Edition

1284231585, 978-1284231588

More Books

Students also viewed these Databases questions

Question

=+j Identify the challenges of training an international workforce.

Answered: 1 week ago