Previous Page C++ Interview Questions Home Next Page
Q.6. How many default constructors can be present in a class? Why?
- There can be only one default constructor in the class.(reason we do not pass any arguments to a default constructor and hence cannot be overloaded).
Q.7. Why default constructors cannot be overloaded? Give reason.
- As we do not pass any arguments to a default constructor and so cannot be overloaded.
Q.8. What is constructor overloading?
Sol : When we have two or more constructors in a program it is known as constructor overloading.