What happens when you attempt to compile and run the following code? #include #include #include using namespace std; int main () { int t[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 }; vector v1(t, t + 10); deque d1(v1.begin(), v1.end());deque d2; d2 = d1; d2.insert(d1.rbegin(), 10); for(int i = 0; i
What happens when you attempt to compile and run the following code? #include #include #include #include using namespace std; templatestruct Out { ostream & out; Out(ostream & o): out(o){} void operator() (const T & val ) { out< v1(10); generate_n(v1.begin(), 10, Sequence(1)); random_shuffle(v1.rbegin(), v1.rend()); sort(v1.begin(), v1.end(), great()); for_each(v1.begin(), v1.end(), Out(cout));cout<
What happens when you attempt to compile and run the following code? #include #include #include using namespace std; int main(){ int t[] ={ 1, 1, 2, 2, 3, 3, 4, 4, 5, 5 }; listv(t, t+10); multiset s1(v.begin(),v.end()); if (s1.count(3) == 2) { s1.erase(3); } for(multiset::iterator i=s1.begin();i!= s1.end(); i++) { cout<<*i<<" "; } return 0; }