105k views
1 vote
In an inheritance situation, you may not pass arguments to a base class constructor.

True

False

1 Answer

7 votes

Answer:

False.

Step-by-step explanation:

We can pass arguments in base class constructor if there is a parameterized constructor present in the base class.

What happens when there is a parameterized constructor present in a class? The answer is the default constructor gets deleted if there is a parameterized constructor present.Then we can only create an object with parameterized constructor and this is applicable for all classes.

User Butanium
by
6.4k points