Suppose class A inherits from base class B. What is the order in which their constructors and destructors will be called when an object of class A is instantiated and then destroyed?
A) B constructor, A constructor, A destructor, B destructor.
B) B constructor, A constructor, B destructor, A destructor.
C) A constructor, B constructor, A destructor, B destructor.
D) A constructor, B constructor, B destructor, A destructor.
Correct Answer:
Verified
Q2: Protected base class members cannot be accessed
Q3: Which of the following is not one
Q4: From most restrictive to least restrictive, the
Q4: CommissionEmployee first, last, ssn, sales, rate )
The
Q8: The is-a relationship represents.
A) Composition.
B) Inheritance.
C) Information
Q9: When should base class members be declared
Q11: Which forms of inheritance are is-a relationships?
A)
Q13: Which of the following is not a
Q13: Which of the following is true about
Q16: Which of the following is not a
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