Quiz on C++ Default Constructors



1. What is a default constructor in C++?
2. Which of the following statements is true about default constructors?
3. What happens if you define a parameterized constructor but do not define a default constructor?
4. Can a class have more than one default constructor?
5. What will happen if you try to use a default constructor for a class that has no default constructor defined?

Advertisements