Exercises
-
21.4 (Fill in the Blanks) Fill in the blanks in each of the following:
Class
string
member function converts astring
to a pointer-based string.Class
string
member function is used for assignment.is the return type of function
rbegin
.Class
string
member function is used to retrieve a substring.
-
21.5 (True or False) State which of the following statements are true and which are false. If a statement is false, explain why.
string
s are always null terminated.Class
string
member functionmax_size
returns the maximum size for astring
.Class
string
member functionat
can throw anout_of_range
exception.Class
string
member functionbegin
returns aniterator
.
-
21.6 (Find Code Errors) Find any errors ...
Get C++ How to Program, 10/e now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.