Question: 3 3 0/1 point Examine this function starts With which determines if str begins with prefix. For what input values does it give the correct




3 3 0/1 point Examine this function starts With which determines if str begins with prefix. For what input values does it give the correct answer? bool startsWith(const string& str, const string& prefix) { if (str.size() 3 O It never gives the correct answer 7 0/1 point Examine this loop fragment. This is called the pattern. for (auto& c:s) { s = c+s; } O None of these are correct O The range pattern O The iteration pattern The modification pattern O The growing a string pattern 10 0/1 point Examine this loop fragment which counts substrings starting with 'c' and ending with 'e' (similar to countCode). For what inputs does it work correctly? for (size_t i = 0, len = str.size(); i 3 O It gives the correct answer in all cases
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
