Question
1.
#include
2.
#include
3.
using namespace std;
4.
template
5.
void print_mydata(T output)
6.
{
7.
cout
What is the output of this program?
1.
#include
2.
#include
3.
using namespace std;
4.
template
5.
void print_mydata(T output)
6.
{
7.
cout
Answer: Option B
Was this answer helpful ?
Answer:a
Explanation:In this program, We are passing the value to the template and printing it in the template.
Output:
$ g++ tem2.cpp
$ a.out
5.5
Hello World
Was this answer helpful ?
Submit Solution