Explore BrainMass
Share

Data Structures + C++ STL

This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

Give the value of v.size() after executing each of the following statements: (Be sure to include the code used to execute the statements. One program will be fine to execute all statements, no need to write multiple programs.)

vector<int> v(25);
v.push_back(-4);
v.resize(40);
m = v.back();
v.pop_back();

© BrainMass Inc. brainmass.com March 21, 2019, 4:21 pm ad1c9bdddf
https://brainmass.com/computer-science/cpp/data-structures-c-stl-182693

Solution Preview

1. vector v(25);
v.size() is 25
2. v.push_back(-4);
...

Solution Summary

c++ program that completes the assignment.

$2.19