Problem

(Swap case) Rewrite the swapCase function in Programming Exercise to obtain a new string s...

(Swap case) Rewrite the swapCase function in Programming Exercise to obtain a new string s2 in which the uppercase letters are changed to lowercase and lowercase to uppercase in s1 using the following function header:

void swapCase(const char s1[], char s2[])

Write a test program that prompts the user to enter a string and invokes this function, and displays the new string. The sample run is the same as in Programming Exercise.

Programming Exercise (Swap case) Write the following function that returns a new string in which the uppercase letters are changed to lowercase and lowercase to uppercase.

string swapCase(const string& s)

Write a test program that prompts the user to enter a string and invokes this function, and displays the return value from this function. Here is a sample run:

Step-by-Step Solution

Request Professional Solution

Request Solution!

We need at least 10 more requests to produce the solution.

0 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the solution will be notified once they are available.
Add your Solution
Textbook Solutions and Answers Search
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT