C++ Interview Question 1 Answer

Bjarne-stroustrup
 

Answer

This question is compilable and deterministic.

Its output is “1”.

Explanation

The templated function will be instantiated as void f(int&), which is a better match than f(const int&).

SOURCE