Question: Do the following operations using the STL vector. After each step display the output 1.Create an integer vector x and insert 20,21 12 2.Create an

Do the following operations using the STL vector. After each step display the output

1.Create an integer vector x and insert 20,21 12

2.Create an integer vector y and insert 10,11,12,13,14 // use 1 line of code to insert these elements

3. Insert 44 before the second element of vector y

4. Insert the contents of x before the second element of vector y

5. Insert three-time 100 before the fourth element of vector y, also display the size of the vector

6. Erase the second to the fifth element of vector y

7. Clear all of y's elements and display the size of the vector.

It's a C++ program.

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!