Question: C++++++ language please 5.8 CIS 22B Lab - Sentence Capitalizer - Sentence Capitalizer. Complete the program that capitalizes the first letter of every sentence. The

C++++++ language please

C++++++ language please 5.8 CIS 22B Lab - Sentence Capitalizer - SentenceCapitalizer. Complete the program that capitalizes the first letter of every sentence.

The program contains a function prototype for the function named sentenceCapitalizer. Thefunction receives a C-string as the parameter. The function does not haveany value to return. The main function reads a string from the

5.8 CIS 22B Lab - Sentence Capitalizer - Sentence Capitalizer. Complete the program that capitalizes the first letter of every sentence. The program contains a function prototype for the function named sentenceCapitalizer. The function receives a C-string as the parameter. The function does not have any value to return. The main function reads a string from the user and then displays the string as is. It then calls sentenceCapitalizer to perform the function and prints the result afterwards. Your job is to write the function definition for sentenceCapitalizer In the function body, walk through the string one position at a time. For each character in the string, determine whether it is the first letter of a sentence and capitalize it accordingly. The sentences may be separated with no spaces or any number of spaces. Your algorithm should not assume that the first letter is always one space away from the previous end of a sentence marker. An end of sentence marker could be: a period (.), a question mark (?) or an escalation point(!). Test the program with this input (including the blanks at the beginning): no, not tonight. it's a very popular place and you have to make reservations in advance. 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 output should look exactly as follows. 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. 374230.2276842.qx3zqy7 LAB ACTIVITY 5.8.1: CIS 22B Lab - Sentence Capitalizer 0 / 10 Downloadable files main.cpp Download main.cpp Load default template... main.cpp Load default template... 8 9 #include 10 #include 11 #include 12 #include 13 14 using namespace std; 15 16 void sentenceCapitalizer (char *userString); 17 18 int main() { 19 const int MAX_SIZE = 1024; 20 21 char user String[MAX_SIZE]; 22 23 //get user string 24 cin.getline(userString, MAX_SIZE); 25 26 //print userString uncapitalized 27 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!