Question: 1 . The exhange function does not work properly. Its task is to exchange two variables Find, fix, and briefly explain the errors. void exchange

1. The exhange function does not work properly. Its task is to exchange two variables
Find, fix, and briefly explain the errors.
void exchange ( ORDER b1, ORDER b2)
{
ORDER hold;
hold = b1;
b1= b2;
b2= b1;
}
2. Use the exhange function (defined and corrected above) to randomize a list of books.
The function must use random numbers: generate a random number in the range
0 to size 1 then exchange the current book with the book in the random position.
void unsort (ORDER list[], int size )
{

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!