Question: C program include Create a program in which a user can enter a string (up to 25 characters) and choose how they wish to manipulate

C program

include

Create a program in which a user can enter a string (up to 25 characters) and

choose how they wish to manipulate the string from a menu the program will

display. The program will continue to ask for commands until the user enters

the quit command. The commands are:

Replace All If a user types replace all using ANY sort of capitalization,

the program will prompt the user to enter the character to change and the new

character. Afterwards, it will replace all instances of the first character with

the new character and will printout the new string. This method does change

the original sentence entered.

Quit If the user types quit with any sort of capitalization, the program will stop running.

Example

Enter a string (up to 25 characters) to be transformed: Go Tigers

Enter your command (quit, replace all): REPLACE ALL Enter the character to replace: e Enter the new character: 3 Your new sentence is: Go Tig3rs

Enter your command (quit, replace all): replace some aaaaaaaaaaaaa12341234

Sorry, that command is invalid. Please type one of the options.

Enter your command (quit, replace all): replace all Enter the character to replace: i Enter the new character: 1 Your new sentence is: Go T1g3rs

Enter your command (quit, replace all): rePLace ALL Enter the character to replace: q Error, q is not in the string.

Enter your command (quit, replace all): QUIT

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!