What happens when you attempt to compile and run the following code?

What happens when you attempt to compile and run the following code?
#include #include using namespace std;
www.vceplus.com – VCE Exam Simulator – Download A+ VCE (latest) free Open VCE Exams – VCE to PDF Converter – PDF Online
class A { public: A() { cout << "A0 ";} A(string s) { cout << "A1";} }; class B : public A { public: B() { cout << "B0 ";} B(string s) { cout << "B1 ";} }; class C : private B { public: C() { cout << "C0 ";} C(string s) { cout << "C1 ";} }; int main () { B b1; C c1; return 0; } A. It prints: A0 B0 A0 B1 A0 C0 A0 C1
B. It prints: B0 B1 C0 C1
C. It prints: A0 B0 A0 B0 C0
D. It prints: B0 B1

Download Printable PDF. VALID exam to help you PASS.

Posted in: CPA

Leave a Reply

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


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