Question: Consider the classes below, declared in the same file: class A { int a; public AO { a = 7; class B : A {
Consider the classes below, declared in the same file: class A { int a; public AO { a = 7; class B : A { int b; public B { b-8; 1 ) Which of the statements below is true? a. A reference of type class A can be used to point to an object of class B. b. After the constructor for class B is executed, the variable a will have the value 8. c. After the constructor for class B is executed, the variable b will have the value 7. O d. Both variables a and bare class variables
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
