Sail E0 Webinar
Question


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
Options:
A .  1
B .  2
C .  3
D .  4
Answer: Option B

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

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers