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