Exercise: Constructors And Destructors

Questions for: Constructors And Destructors

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?
A:
Compile-time error.
B:
Preprocessing error.
C:
Runtime error.
D:
Runtime exception.
Answer: A
No answer description is available. Let's discuss.
A constructor that accepts __________ parameters is called the default constructor.
A:
one
B:
two
C:
no
D:
three
Answer: C
No answer description is available. Let's discuss.
Ad Slot (Above Pagination)
Quiz