Given the function, and the main function calling it: Which, if any, of the following choices is the output of the following code? What does this function do?
```
#include
using namespace std;
void func ( int& x, int & y)
{
int t = x;
x = y;
y = t;
}
int main()
{
int u = 3; v = 4;
// ...
cout << u << " " << v << endl;
func ( u, v )
cout << u << " " << v << endl;
// ...
}
```
a) 3 4
3 3
b) 3 4
4 3
c) 3 4
3 4
d) 3 4
4 4
e) none of the above. If you choose this, you must specify the output
b) 3 4
4 3
The code swaps the values stored in the caller's arguments
You might also like to view...
The W3C plans to continue developing the standards for HTML
Indicate whether the statement is true or false
When software is purchased, a _____ is being bought that gives the purchaser the right to use the software under certain terms and conditions.
A. fixed fee model B. request for proposal C. software license D. supplemental maintenance agreement