If string s1 has the value "computer" and string s2 has the value "promise", which call to insert will produce the string "compromise"?
A) s1.insert(4, s2, 0, string::npos) ;
B) s1.insert(string::npos, s2, 0, 4) ;
C) s2.insert(0, s1, 0, 3) ;
D) s2.insert(3, s1, 0, 3) ;
Correct Answer:
Verified
Q7: Which of the following is not overloaded
Q8: The arguments passed to replace do not
Q9: Given the strings defined below, which statement
Q10: The function call string1.erase(5) will:
A) Return a
Q11: Strings:
A) Can use the subscript operator to
Q13: If string s1 is lexicographically greater than
Q14: Which of the following is false?
A) If
Q15: Which of the following returns a bool?
A)
Q16: If string s contains "antidisestablishmentarianism", then s.substr(7,
Q17: Class string has member function _ to
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents