Which pieces of code inserted independently into places marked 1 and 2 will cause the program to compile and display: 0 1 2 3 4 5 6 7 8 9?

Which pieces of code inserted independently into places marked 1 and 2 will cause the program to compile and display: 0 1 2 3 4 5 6 7 8 9? Choose all that apply.


A. place 1: operator int() {return a;}
B. place 1: operator int() {return a;} bool operator < (const A & b) {return this?>a< b.a;}
C. place 1: bool operator < (const A & b) {return this?>a< b.a;}
D. place 1: bool operator < (const A & b) {return this?>a< b.a;} friend ostream & operator <<(ostream & c, const A & a); place 2: ostream & operator <<(ostream & c, const A & a) {c<<a.a; return c;}
E. place 1: bool operator < (const A & b) {return this?>a< b.a;} place 2: ostream & operator <<(ostream & c, const A & a) {c<<a.a; return c;}

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.