Write a void function using two type int call-by-reference parameters that swaps the values in the arguments. Be sure to include testable pre and post conditions.

What will be an ideal response?

```
//precondition: arguments arg1, arg2 are initialized
//postcondition: arg1 post == arg2 pre && arg2 post == arg1 pre
void swap( int & lhs, int & rhs)int temp = lhs;
lhs = rhs;
rhs = tmp;
```

Computer Science & Information Technology

You might also like to view...

Computers that use ________ are referred to as third-generation computers

Fill in the blank(s) with correct word

Computer Science & Information Technology

The list of results returned to you when you search for information on the web is called a list of ________

A) strikes B) queries C) hits D) keywords

Computer Science & Information Technology