Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(Using C++ Codes) Write a program that uses a C-string (character array) to store a string entered from the keyboard. The program will then provide

(Using C++ Codes)

Write a program that uses a C-string (character array) to store a string entered from the keyboard. The program will then provide 4 options about operations performed on the input string in the form of a menu, as shown in the following sample Input/Output. The 4 operations are given below: 
1. reverse the string 
2. print the length of the string 
3. convert the string case, i.e. from upper case to lower and from lower to upper case 
4. print number of words in the string 
 image text in transcribed 
Exercise #3: Some operations on Strings Write a program that uses a C-string (character array) to store a string entered from the keyboard. The program will then provide 4 options about operations performed on the input string in the form of a m as shown in the following sample Input/Output. The 4 operations are given below: reverse the string 2. print the length of the string convert the string c e. from upper case to lower and from lower to upper case print number of words in the string Note: It is not allowed to use the string library functions for the 4 operations. Sample input/output: MANGO IS sweet Enter a string of your choice of size 100 Cnaximum Press 1 to reverse the string Press 2 to print the length of the string Press 3 to convert the string case Clower case to upper and vice versa Press 4 print number of words in the string teews SI OGNAM 8.315 s Process returned 0 X0x0 execution time Press any key to continue Enter a String of your choice of size 100 Kmaximum MANGO IS sweet Press 1 to reverse the string Press 2 to print the length of the string Press 3 to convert the string case Clower case to upper and vice versa> Press 4 print number of words in the string ength is 15 rocess returned 0 X2x0 execution time 8.754 s ress any key to continue Enter a String of your choice o 00 (maximum MANGO IS sweet SC 12e Press 1 to reverse the string Press 2 to print the length of the string Press 3 to convert the string case Clower case to upper and vice versa Press 4 print number of words in the string mango is SWEET Process returned 0 K0x0> execution time 8.856 s Press any key to continue Enter a string of your choice of size 100 Kmaximum MANGO IS sweet Press 1 to reverse the string Press 2 to print the length of the string Press 3 to convert the string case Clower case to upper and vice versa> Press 4 print number of words in the string rocess returned 0 X0x0 execution time 8.361 s ess any key to continue

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

Step: 3

blur-text-image

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

Database Design Application Development And Administration

Authors: Michael V. Mannino

3rd Edition

0071107010, 978-0071107013

More Books

Students also viewed these Databases questions

Question

2. Show the trainees how to do it without saying anything.

Answered: 1 week ago