Back to Multiple Choice Quiz
Template Function Output
C++ quiz · Question 54What is the output of the following program?
#include <iostream>
using namespace std;
template <typename T>
void printDouble(T x) {
cout << x * 2 << "\n";
}
int main() {
printDouble(5);
printDouble(2.5);
}