Read Program 5:
(5) Read the definition of the following class, say the result of a call in a different situation in the test function # include <iostream>using namespace Std;class a{protected:int a,b;public:a (i NT AA, int bb): A (AA), B (BB) {} void PrintA () {cout<< "A:" <<a<< "\TB:" <<b<<endl; }};class b:public a{int c;public:b (int aa, int bb, int cc): A (AA,BB), C (cc) {} void Printb () {COUT&L t;< "A:" <<a<< "\TB:" <<b<< "\TC:" <<c<<endl; }};int Main () {a A (); b b (2,3,4); Add the code in the following quiz return 0;} (a) a=b; A.printa (); B.printa (); B.PRINTB (); 12341234 What do you think the output is: The result of the ____________ Run program is: ____________ (b) b=a; A.printa (); B.printa (); B.PRINTB (); The program will compile errors because: ____ records the errors in the IDE and understands: ___ (c) A &r1=a; A &r2=b; R1.printa (); R2.printa (); R2.PRINTB (); the wrong line will be deleted; for the rest of the program, you think the output is: ____ The actual running output is: __________ the wrong reason for that line is: ________ (d) A *p=&a; P->printa (); p=&b; P->printa (); P->PRINTB (); Delete the line where the error occurred; for the rest of the program, you think the output is: __The actual output is: __________ the wrong reason for the line is: ________ (e) Adds a member function in Class A: int Geta () {return A;} adds a general function before the main function: void F (A x) {cout< ;< "Aaaaah, my A:" <<x.geta () <<endl;} The specified part of the main function is: f (a); f (b); What do you think the result of the output is: ____________ The result of the Run program is: ____________(a):
A:2 B:3
A:2 B:3
A:2 B:3 C:4
(b):
_ An object of a common derived class can be used as the object of a base class, and conversely, the ___ &NBSP;
record the errors prompted in the IDE and understand: _no Match for ' operator= ' b=a ' __ &NBSP;
(c):
The wrong reason for the line is that you cannot find the function in Class A PRINTB
(d)
The reason for the error in that line is: function Printb not found in Class A
(e)
Aaaaah, my a:1
Aaaaah, my A:2
Tenth week-Read the program