What happens when a class with parameterized constructors and having no default constructor is used in a program and we create an object that needs a zero-argument constructor?
Options
A. Compile-time error.
B. Preprocessing error.
C. Runtime error.
D. Runtime exception.
Correct Answer
Compile-time error.
Constructors and Destructors problems
Search Results
1. Which of the following statement is incorrect?
Options
A. Constructor is a member function of the class.
B. The compiler always provides a zero argument constructor.
C. It is necessary that a constructor in a class should always be public.