Vidyalelo
C++ Programming · Q243

Classes and Objects in C++

Programming · C++ Programming · question 243

Q243

What will be the output of the following C++ code? #include #include using namespace std; class test public: operator string () return "Converted"; ; int main() test t; string s = t; cout << s << endl; return 0;

A.
converted
Answer
B.
error
C.
run time error
D.
convertedconverted

Answer: Option A

Solution

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