Vidyalelo
C++ Programming · Q788

C++ miscellaneous

Programming · C++ Programming · question 788

Q788

What will be the output of the following C++ code? #include #include using namespace std; template void print_mydata(T output) cout << output << endl; int main() double d = 5.5; string s("Hello World"); print_mydata( d ); print_mydata( s ); return 0;

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

Answer: Option A

Solution

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