Question: We are going to do one program using C-strings. Use basic C-String (header) only. Nothing fancy. But before we get started - a reminder: All

We are going to do one program using C-strings. Use basic C-String (header) only. Nothing fancy.

But before we get started - a reminder: All your programs need to be of modular design. Use functions appropriately

Please design and then code the following menu-driven program.

The Name Game:

1. Input Full Name

2. Display Name

3. Change my Name to all Lower Case.

4. Count and display the number of words in name

5. Reverse the Name

6. Display Most Frequent Character

7. Exit Menu

Programming Rules:

Declare a character array in main. Use a separate function for each menu item. Pass the name around to each function. Use the C-string functions to manipulate the name.

Validate Input Full Name for not empty.

Keep offering the menu until they choose quit.

Appropriate use of functions required - no global variables - good programming style throughout.

Use Programs 10-12, 10-13 and 10-14 as examples.

Example:

1. Input Full Name: Billie Alice Williams

2. Display Name: Billie Alice Wiliams

3. Change to Lower: Your name has been converted to lower case.

2. Display Name: billie alice williams

4. Count: There are 3 words in your name.

5. Reverse Name: Your name has been reversed.

2. Display Name: smailliw ecila eillib

6. Most Letters: The most used letter in your name is l

7. Exit: Thank you for playing the game.

We are going to do one program using C-strings. Use basic C-String(header) only. Nothing fancy. But before we get started - a reminder:All your programs need to be of modular design. Use functions appropriatelyPlease design and then code the following menu-driven program. The Name Game:1. Input Full Name 2. Display Name 3. Change my Name to

function Program 10-12 1 1 This program uses a function to copy a c-string into an array. 2 #include 3 using namespace std; s void stringCopy (char [1, char (): // Function prototype 7 int main) const int LENGTH-30: 11 size of the arrays char first[LENGTH ] : char second [ LENGTH]: To hold the copy 10 // To hold the user's input 12 13 14 15 16 17 18 19 20 21 // Get a string from the user and store in first. cout

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!