Question 1
Determine the output of the program if each
a)FinalA *obj = new FinalC( ); line 15
obj->display('A');
b)FinalA *obj = new FinalB( ); line 15
obj->display('A');
c)FinalB *obj = new FinalC( ); line 26
obj->display('A');
d)FinalC *obj =new FinalC( ); line 36
obj->display('A');
e)FinalB *obj = new FinalC( ); line 33
obj->display( );
f)FinalA *obj =new FinalB( ); line 10
obj->display( );
g)FinalA *obj =new FinalC( ); line10
obj->display( );
h)FinalA *obj =new FinalB( ); line 26
obj->display(85 );
i)FinalA *obj =new FinalC( ); line 26
obj->display(85 );
j)FinalB *obj = new FinalC( ); line 26
obj->display(85 );
Question 2,Guess the output for each program
Program 2.a
Program 2.b
Program 2.d
0 Comments