Examveda

What is the purpose of the keyword 'explicit' before a constructor 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 Classes and Objects in C plus plus