Chapter 8: Problem 12
Consider the following statement: string str \(=\) "Now is the time for the party!"; What is the output of the following statements? (Assume that all parts are independent of each other.) a. cout \(<<\) str.size ()\(<<\) endl b. \(\operatorname{cout}<<\operatorname{str} . \operatorname{substr}(7,8)<<\operatorname{end} 1\) c. string: : size_type ind \(=\operatorname{str} .\) find \((\text { 'f } ')\) string \(s=s t r .\) substr \((i n d+4,9)\) cout \(<<\mathrm{s}<<\) endl d. cout \(<<\) str.insert \((11, \text { "best } ")<<\) endl e. str.erase (16,14) str.insert \((16,\) "to study for the exam? "); cout \(<<\) str \(<<\) endl
Short Answer
Step by step solution
Key Concepts
These are the key concepts you need to understand to accurately answer the question.