I'm having trouble understanding the output from this program. Can someone explain to me why the output is "2 2" if test returns by value and "2 1" when it returns by reference?Code:#include <iostream> int& test(int& i) { ++i; return i; } int main() { int i = 0; std::cout << test(i) << ' ' << test(i) << '\n'; }