Given class sample is inherited by class sample 1. Which are the correct statements about construction of object of class sample?
(a) While creating the object firstly the constructor of class sample will be called followed by constructor of class sample 1
(b) The constructor of only sample class will be called
(c) While creating the object firstly constructor of class sample 1 will be called followed by constructor of class sample
(d) The order of calling constructors depend on whether constructors in class sample and sample 1 are private or public
I got this question during a job interview.
The above asked question is from Fundamentals of Inheritance topic in division Object Oriented Concepts of C#