Question: C++ question 7. What are the values of the elements in the vector named names.1 after the following code is executed? vector names_1 { Mike,

 C++ question 7. What are the values of the elements in

C++ question

7. What are the values of the elements in the vector named names.1 after the following code is executed? vector names_1 { "Mike", "Ben", "Joel", "Anne" }; vector names_2 { "Judy", "Samantha", "Kelly" }; names_1.insert(names_1.end(), "Mary"); names_1.erase(names_1.begin(); names_1.insert(names_1.begin() +2, ++names_2.begin(), names_2.end()); names_1. swap(names_2); names_1.erase(++names_1.begin(); names_1.insert(names_1.begin(), ++names_2.begin(), names_2.begin() + 2); 2. Joel, Judy, Kelly b. Judy, Mary, Joel, Mary c. Joel, Judy, Samantha d. Joel, Anne, Judy, Samantha

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!