Suppose class Child is derived from class Parent that was in turn derived from class GrandParent. This question concerns order of calls to constructors and destructors for these three classes. Declare an object of class Child. We know that Child, Parent and GrandParent constructors are called. In what order are these constructors are called? When the time comes to destroy the class Child object, we know that Child, Parent and GrandParent destructors are called. In what order are these destructor called?
What will be an ideal response?
The constructors are called starting with the constructor for the ultimate base class, class GrandParent, then the first derived class, class Parent, then the object’s class, class Child. At destruction of the Child object, destructors are called in reverse order of their invocation.
You might also like to view...
The following segment of code: cout<<"Hello students"; is an example of a(n):
A. statement. B. input parameter list. C. operator. D. return type.
Name the three common strategies for execution of SQL injections.
What will be an ideal response?
Permission inheritance defines how permissions are transmitted from a child object to a parent object.
Answer the following statement true (T) or false (F)
The administrator would like to use the strongest encryption level possible using PSK without utilizing an additional authentication server. Which of the following encryption types should be implemented?
A. WPA2 Enterprise B. WEP C. MAC filtering D. WPA personal