Vidyalelo
C++ Programming · Q11

Constructors and Destructors in C++

Programming · C++ Programming · question 11

Q11

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
Answer
C.
To mark the constructor as static
D.
None of the above

Answer: Option B

Solution

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