Q759
What will be the output of the following C++ function? #include using namespace std; template T max(T x, T y) return (x > y)? x : y; int main() cout << max(3, 7) << std::endl; cout << max(3.0, 7.0) << std::endl; cout << max(3, 7.0) << std::endl; return 0;
A.
7
7.0
7.0
7.0
7.0
B.
7
7
7
7
7
C.
7.0
7.0
7.0
7.0
7.0
D.
Error
AnswerAnswer: Option D
Solution
Answer: Option D
No explanation is given for this question Let's Discuss on Board