C++ | Constructors | Question 16
Predict the output of following program?
(A) Compiler Error
Explanation: If a class has a constructor which can be called with a single argument, then this constructor becomes conversion constructor because such a constructor allows automatic conversion to the class being constructed.
A conversion constructor can be called anywhere when the type of single argument is assigned to the object. The output of the given program is