Examveda

What is the primary purpose of the explicit keyword in a C++ constructor?

A. To mark the constructor as static

B. To specify the return type of the constructor

C. To allow implicit type conversions

D. To prevent implicit type conversions

Answer: Option D


Join The Discussion

Related Questions on Constructors and Destructors in C plus plus