Question: 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


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 sentence Capitalizer 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. besides, it's expe nsive, 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 reservatio ns 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 reservation s in advance. Besides, it's expensive, and I don't have any money. #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
