See the following code:
#include <iostream>
using namespace std;
void swapvars( int& a, int& b ) {
int temp = a;
a = b; // a is now b
b = temp; // b is now a
}
int main ()
{
int a = 2;
int b = 3;
swapvars( a, b );
cout << "The value of a is " << a << " and the value of b is " << b;
return 0;
}
What will be output by the above program?
<poll What will be output by the above program? [d]>
</poll>