Consider the classes below,declared in the same file:
Class A
{
Int a;
Public A()
{
A = 7;
}
}
Class B : A
{
Int b;
Public B()
{
B = 8;
}
}
Which of the statements below is false
A) Both variables a and b are instance variables.
B) After the constructor for class B is executed, the variable a will have the value 7.
C) After the constructor for class B is executed, the variable b will have the value 8.
D) A reference to class A can be treated as a reference to class B.
Correct Answer:
Verified
Q18: Every object of a base class is
Q19: Multiple inheritance,widely used in C#,is the process
Q20: All classes in C# have object as
Q21: Which base class members are inherited by
Q22: Base class methods with this level of
Q24: To avoid duplicating code (and possibly errors),use
Q25: Which of the following classes is the
Q26: The protected members of a class may
Q27: Overriding a method differs from overloading a
Q28: When a derived class constructor calls its
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents