The following function should swap the values contained in two integer variables, num1 and num2. What, if anything, is wrong with this function?
```
void swap(int num1, int num2)
{
int temp = num2;
num2 = num1;
num1 = temp;
}
```
a. You must first initalize temp to 0 before using it.
b. The variable temp should first be set to num1, not num2.
c. The swap function must use reference parameters.
d. The last line should be temp = num1.
e. Nothing is wrong with this function.
c. The swap function must use reference parameters.
You might also like to view...
Identify the letter of the choice that best matches the phrase or definition.
A. Selects the cell one worksheet window to the right. B. Selects the cell at the beginning of the row that contains the active cell. C. Selects cell A1. D. Selects the adjacent cell in the direction of the arrow on the key. E. Displays the Find dialog. F. Moves the insertion point to the end of data in a cell. G. An alternative to double-clicking cell to edit it is to select the cell and then press this H. Highlights one or more adjacent characters to the right. I. Deletes characters to the left of the insertion point. J. Not used to clear a cell.
You can change the spacing, or position of text within a document's margins, using the alignment buttons in the Paragraph group on the Home tab of the ribbon.
Answer the following statement true (T) or false (F)
?By showing processes as _____, an analyst can create data flow diagrams (DFDs) that show how the system functions but avoid unnecessary detail and clutter.
A. ?black boxes B. ?process descriptions C. ?business rules D. ?decision tables
To create a journal entry from any folder, such as Mail or Tasks, click the ____ button on the Home tab.
A. Journal B. New Task C. New Items D. Change View