What is the output of the following program?
#include using namespace std;class bClass{public:void print() const;bClass(int a = 0, int b = 0);//Postcondition: x = a; y = b;private:int x;int y;};class dClass: public bClass{public:void print() const;dClass(int a = 0, int b = 0, int c = 0);//Postcondition: x = a; y = b; z = c;private:int z;};int main(){bClass bObject(2, 3);dClass dObject(3, 5, 8);bObject.print();cout << endl;dObject.print();cout << endl;return 0 ;}void bClass::print() const{cout << x << " " << y << endl;}bClass::bClass(int a, int b){x = a;y = b;}void dClass::print() const{bClass:print();cout << " " << z << endl;}dClass::dClass(int a, int b, int c): bClass(a, b){z = c;}

A. 2 3
2 3
B. 2 3
3 5 8
C. 3 5 8
3 5 8
D. 5 8
3 5 8


Answer: B

Computer Science & Information Technology

You might also like to view...

An object is ____ that can be treated as an individual unit or component.

A. state and contents B. file and data C. formatting and color D. programming code and data

Computer Science & Information Technology

Services using the TCP/IP protocol can run only on their commonly used port number as specified in their original Internet standard.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

____ is one of the categories of update anomalies.

A. Functional dependence B. Functional splitting C. Inconsistent data D. Qualification

Computer Science & Information Technology

What are the minimum disk space and memory required for a system to run Linux reasonably well?

What will be an ideal response?

Computer Science & Information Technology