← Back to Question List
C++ Quiz #55
Template Type Deduction
What is the output of this code?
``cpp
#include <iostream>
using namespace std;
template <typename T>
T addOne(T x) {
return x + 1;
}
int main() {
cout << addOne(4) << "\n";
cout << addOne(4.9) << "\n";
}
``