Multiple Choice
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.
Correct Answer:

Verified
Correct Answer:
Verified
Q9: Assume you have two integer variables, num1
Q10: When an array is sorted from highest
Q11: Before you can perform a bubble sort,
Q12: A(n) _ search uses a loop to
Q13: A _ search is more efficient than
Q15: The following is the pseudocode for which
Q16: Algorithms used to arrange random data in
Q17: The bubble sort is an easy way
Q18: The following is the pseudocode for which
Q19: The _ is adequate for searching through