Vidyalelo
C++ Programming · Q913

C++ miscellaneous

Programming · C++ Programming · question 913

Q913

What will be the output of the following C++ code? #include #include using namespace std; template class Print public: int operator()(T a) cout str; Print integer; int a = 100; string s = "Hello World"; str(s); integer(a); return 0;

A.
100
100
B.
100
Hello World
C.
Hello World
Hello World
D.
Hello World
100
Answer

Answer: Option D

Solution

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