Question: What is output? #include using namespace std; template MyType large ( MyType var 1 , MyType var 2 ) { if ( var 1 >

What is output?
#include
using namespace std;
template
MyType large(MyType var1, MyType var2){
if (var1> var2){
return var1;
}
else {
return var2;
}
}
int main(){
cout << large(3,7)<< endl;
cout << large('A','B')<< endl;
cout << large(3.3,3.4)<< endl;
return 0;
}
7 B 3.4
7'A'3.4
7 A 3
Error: The compiler generates an error in all the cout statements because the data type is not specified.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!