What happens when you attempt to compile and run the following code? #include #include #include using namespace std; class B { int val; public:B(int v):val(v){} int getV() const {return val;} bool operator < (const B & v) const { return valstruct Out { ostream & out; Out(ostream & o): out(o){} void operator() (const T & val ) { out< v1(10); sort(t1, t1+5); sort(t2, t2+5); merge(t1,t1+5,t2,t2+5,v1.begin()); 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; }
What happens when you attempt to compile and run the following code? #include using namespace std; int main () { float f1 = 10.0; float f2 = 10.123; cout<
What happens when you attempt to compile and run the following code? #include #include #include using namespace std; class B { int val; public: B(int v):val(v){} int getV() const {return val;} bool operator < (const B & v) const { return valstruct Out { ostream & out; Out(ostream & o): out(o){} void operator() (const T & val ) { out< v1(10,0); sort(t1, t1+5); sort(t2, t2+5); set_union(t1,t1+5,t2,t2+5,v1.begin()); for_each(v1.begin(), v1.end(), Out(cout));cout<
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<