Given the function, and the main function calling it: What is the output of the following code if you omit the ampersand (&) from the first parameter, but not from the second parameter? (You are to assume this code is embedded in a correct function that calls it.):

```
#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


a) 3 4
3 3

The first argument is not changed by the function. The second argument is changed to 3.

Computer Science & Information Technology

You might also like to view...

In a paragraph, explain why a data entry display should emphasize accuracy, whereas an inquiry display emphasizes how fast results may be displayed.

What will be an ideal response?

Computer Science & Information Technology

Which of the following would not be considered a button event?

A. a rollover B. clicking the button C. moving the pointer near a button D. all of the above

Computer Science & Information Technology

____ attempts to match browsing behavior, user profiles, and buying habits with products.

A. Targeted marketing B. Social networking C. Click-through rating D. Business-to-consumer analysis

Computer Science & Information Technology

What is the difference between a Storage Area Network and a Network Attached Storage device?

What will be an ideal response?

Computer Science & Information Technology