Which changes introduced independently will allow the code to compile and display 0 0 1 1 8 8 9 9 (choose all that apply)?

Which changes introduced independently will allow the code to compile and display 0 0 1 1 8 8 9 9 (choose all that apply)?


A. operator int() const {return a;} inserted at Place 1
B. bool operator < (const A & b) const {return a<b.a;} inserted at Place 1
C. bool operator < (const A & b) const {return b.a<a;} inserted at Place 1
D. struct R {bool operator ()(const A & a, const A & b) {return a.getA()<b.getA();}}; inserted at Place 2 replacing line marked 3 with set<A, R>s(t, t+10); replacing line marked 4 with multiset<A,R> s1(s.begin().s.end()); replacing line marked 5 with multiset<A,R>::iterator i=s1 .begin();

Download Printable PDF. VALID exam to help you PASS.

Posted in: CPP

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.