Question: C++ Write a program named Lab3.cpp. The program should satisfy the requirements specified in chapter 10, program challenge #5, Sentence Capitalizer with the following exceptions:

C++

Write a program named Lab3.cpp. The program should satisfy the requirements specified in chapter 10, program challenge #5, Sentence Capitalizer with the following exceptions: instead of asking the user to input a string and passing it to the function, initialize the C-string with the following string:

"no, not tonight. it's a very popular place and you have to make reservations in advance. besides, it's expensive, and I don't have any money."

The modified string should look like:

"No, not tonight. It's a very popular place and you have to make reservations in advance. Besides, it's expensive, and I don't have any money."

The punctuation marks that signal the end of a sentence are the period, the question mark and the exclamation mark.

So your code should work with sentences that end with the question mark and the exclamation mark too.

Yes, your program needs to include the main function that prepares the C-string and calls the function as written there in the book.

Display the text before and after the call. The output of your program should look something like the following:

The text before the modification: no, not tonight. it's a very popular place and you have to make reservations in advance. besides, it's expensive, and I don't have any money. The text after the modification: No, not tonight. It's a very popular place and you have to make reservations in advance. Besides, it's expensive, and I don't have any money.

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!