How many parameters are legal for non-type template?
What may be the name of the parameter that the template should take?
Which are done by compiler for templates?
How many types of templates are there in c++?
What is the output of this program?
1. #include2. #include 3. using namespace std; 4. template 5. void print_mydata(T output) 6. { 7. cout << output << endl; 8. } 9. int main() 10. { 11. double d = 5.5; 12. string s("Hello World"); 13. print_mydata( d ); 14. print_mydata( s ); 15. return 0; 16. }
a) 5.5
Hello World
b) 5.5
c) Hello World
d) none of the mentioned