Question: 23.(8 pts) Write a segment of code that: Prompts for and reads in a sentence ending in a question mark (?). Determines and outputs the

 23.(8 pts) Write a segment of code that: Prompts for and

23.(8 pts) Write a segment of code that: Prompts for and reads in a sentence ending in a question mark (?). Determines and outputs the number of characters in the sentence (The ? is not part of the sentence) Extracts and outputs a substring from the sentence starting at character position 8 and containing 6 characters Assume that all header files have been declared, and use the following variable declarations only. string sentence; string sub; string::size type num; // number of characters // word read from standard input // substring pulled from the sentence

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!