Examveda

What is the purpose of using the 'explicit' keyword in front of a constructor declaration in C++?

A. To specify the return type of the constructor

B. To prevent implicit conversions during object initialization

C. To mark the constructor as static

D. None of the above

Answer: Option B


Join The Discussion

Related Questions on Constructors and Destructors in C plus plus