CPA-21-02 Web TestEngine demo

Exit VCEDump CPA-21-02 CPA - C++ Certified Associate Programmer
Question 35 of 39
0% complete
Q35 Single choice

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

#include <iostream>

#include <string>

using namespace std;

class A {

public:
A() { cout << "A no parameters";}

A(string s) { cout << "A string parameter";}

A(A &a) { cout << "A object A parameter";}

};

class B : public A {

public:

B() { cout << "B no parameters";} B(string

s) { cout << "B string parameter";} };

int main () {

A a2("Test");

B b1("Alan");

B b2(b1);

return 0;

}

Sign in to mark questions

Sign in to save marked questions and return to this demo.

Sign in