What does the function given here do when called if both the ampersands (&) are removed? Why?

```
void func(int& x, int& y)
{
int t = x;
x = y;
y = t;
}
```


Nothing. The function has no effect at all.
Explanation: With the parameters changed from reference to value, the function can do nothing. There is no effect external to this function. There are no changes are made to the caller’s arguments. The only changes are made to local variables and value parameters.

Computer Science & Information Technology

You might also like to view...

Answer the following questions true (T) or false (F)

1. Inline functions are always more efficent than noninline functions. 2. A static variable of a class cannot be changed.

Computer Science & Information Technology

A(n) ________ is a combination of fields, mathematical operators, and prebuilt functions that calculates values in tables, forms, queries, and reports

A) expression B) operator C) comparison D) wildcard

Computer Science & Information Technology

Passwords do not prevent users from editing a worksheet or the entire workbook

Indicate whether the statement is true or false

Computer Science & Information Technology

Use the CTRL + A keys to select all of the text in a document.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology