Fill in the blanks in each of the following:
Header ___________ must be included for class string.
Class string belongs to the ______________ namespace.
Function ___________ deletes characters from a string.
Function ___________ finds the first occurrence of any character from a string.
State which of the following statements are true and which are false. If a statement is false, explain why.
Concatenation of string objects can be performed with the addition assignment operator, +=.
Characters within a string begin at index 0.
The assignment operator, =, copies a string.
A C-style string is a string object.
Find the error(s) in each of the following, and explain how to correct it (them):
string string1( 28 ); // construct string1
string string2( 'z' ); // construct string2
// assume std namespace is known
const char *ptr = name.data(); // name is "joe bob"
ptr[ 3 ] = '-';
cout << ptr << endl;