Ch08_Logic8e_Solutions - Programming Logic and Design 8e Solutions 8-1 Programming Logic and Design 8th Edition Chapter 8 Review Questions REVIEW

# Ch08_Logic8e_Solutions - Programming Logic and Design 8e...

• Homework Help
• 64
• 94% (108) 102 out of 108 people found this document helpful

This preview shows page 1 - 5 out of 64 pages.

Programming Logic and Design, 8e Solutions 8- Programming Logic and Design, 8th Edition Chapter 8 Review Questions REVIEW QUESTIONS 1.Employee records stored in order from highest-paid to lowest-paid have been sorted in _____ order. a.recursiveb.ascendingc.staggeredd.descending 2.Student records stored in alphabetical order by last name have been sorted in _____ order. 3.When computers sort data, they always _____. 4.Which of the following code segments correctly swaps the values of variables named xand y? 1
Programming Logic and Design, 8e Solutions 8- y = temp x = temp x = y y = temp temp = x y = temp y = x x = temp 5.Which type of sort compares list items in pairs, swapping any two adjacent valuesthat are out of order? a.insertion sortb.indexed sortc.bubble sortd.selection sort 6.To sort a list of 15 values using a bubble sort, the greatest number of times you would have to pass through the list making comparisons is _____. 7.To completely sort a list of eight values using a bubble sort, the greatest possible number of required pair comparisons is _____. 2
Programming Logic and Design, 8e Solutions 8- 8.When you do not know how many items need to be sorted in a program, you can create an array that has _____. the program. 9.In a bubble sort, on each pass through the list that must be sorted, you can stop making pair comparisons _____. a.one comparison soonerb.two comparisons soonerc.one comparison laterd.two comparisons later 10.When performing a bubble sort on a list of 10 values, you can stop making passesthrough the list of values as soon as _____ on a single pass through the list. 11.The bubble sort is _____. 3
Programming Logic and Design, 8e Solutions 8-

#### You've reached the end of your free preview.

Want to read all 64 pages?

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern