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 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
Get step-by-step solutions from verified subject matter experts
