Define a function named swap that exchanges the values of its two type double input/output parameters. For example, if x = 2.2 and y = 3.3, after the call swap( x, y ); x would be 3.3 and y would be 2.2.
What will be an ideal response?
```
void swap (double& arg1, double& arg2)
{
double temp;
temp = arg1;
arg1 = arg2;
arg2 = temp;
}
```
Computer Science & Information Technology
You might also like to view...
A small empty callout is the image used for the ________ icon
Fill in the blank(s) with correct word
Computer Science & Information Technology
________ indicates the proportional relationship between a display's width and height.
A. Dot pitch B. Contrast ratio C. Aspect ratio D. Bit rate
Computer Science & Information Technology