Vidyalelo
C++ Programming · Q3

Constructors and Destructors in C++

Programming · C++ Programming · question 3

Q3

What happens if a class does not explicitly declare any constructors in C++?

A.
A compilation error occurs
B.
The class cannot be instantiated
C.
The class is initialized with default values
D.
A default constructor is provided by the compiler
Answer

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board