Question: For the remaining three problems in this Exercise, we assume that the sort function from Figure 2.27 is changed in the following way: Figure 2.27
For the remaining three problems in this Exercise, we assume that the sort function from Figure 2.27 is changed in the following way:
Figure 2.27


When sorting a 10-element array that was sorted in descending order (opposite of the order that sort() creates), how many more (or fewer) instructions are executed as a result of this change?
a. b. void swap(int *p. int *q){ int temp: temp=*p: *p=*q: *q-temp: void swap(int *p. int *q){ *p=*p+*q: *q=*p-*q: *p=*p-*q:
Step by Step Solution
3.42 Rating (161 Votes )
There are 3 Steps involved in it
Explanation The change in the swap function from Figure 227 involves swapping the values of two p... View full answer
Get step-by-step solutions from verified subject matter experts
