Quiz
Chapter 9 multiple choice
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (15)
1In the bubble sort algorithm the two arguments sent into the swap module are ___________.
- Aarray[index+1] and array[index-1]
- BNone of the answers
- Carray[index] and array[index-1]
- Darray[index-1] and array[index]
- Earray[index-1] and array[index+1]
2Which searching algorithm requires the array to be ordered?
- AParallel
- BLinear
- CSequential
- DNone of the answers
- EBinary
3As the __________sorting algorithm makes passes through and compares the elements of the array certain values move toward the end of the array with each pass.
- ANone of the answers
- BBubble
- CInsertion
- DSelection
- EHash
4What does the variable middle represent in a binary search algorithm?
- AThe average of two values
- BMiddle value in the array
- CSubscript of the midpoint
- DNone of the answers
- EMiddle value in the portion to be searched
5In the swap module the third variable is declared as a __________ variable.
- AReference
- BNone of the answers
- CConstant
- DLocal
- EGlobal
6This algorithm begins by sorting the first two elements of the array, which become a sorted subset. Then, the third element is moved to its correct position relative to the first two elements. At that point, the first three elements become the sorted subset. This process continues with the fourth and subsequent elements until the entire array is sorted.
- Ainsertion sort
- Bselection sort
- Cbubble sort
- Dsequential sort
7This search algorithm is adequate for small arrays but not large arrays.
- Anatural order search
- Bsequential search
- Cselection search
- Dbinary search
8Which statement is true after the execution of the following statements?
Set t = x
Set x = y
Set y = t- Ax contains the value in y and y stayed the same
- BNone of the answers
- Cx and y contain their original values
- Dy contains the value in x and x stayed the same
- Ex and y swapped their values
9This search algorithm steps sequentially through an array, comparing each item with the search value.
- Aselection search
- Bbinary search
- Csequential search
- Dnatural order search
10Which of the following is a sorting algorithm?
- ABubble sort
- BInsertion sort
- CSelection sort
- DNone of the answers
- EAll of the answers
11This search algorithm repeatedly divides the portion of an array being searched in half.
- Abinary search
- Bnatural order search
- Cselection search
- Dsequential search
12In a selection sort which variable holds the subscript of the element with the smallest value found in the scanned area of the array?
- AminValue
- BSIZE
- CNone of the answers
- DminIndex
- EstartScan
13In this algorithm, the smallest value in the array is located and moved to element 0. Then the next smallest value is located and moved to element 1. This process continues until all of the elements have been placed in their proper order.
- Asequential sort
- Bbubble sort
- Cinsertion sort
- Dselection sort
14When the elements in an array are stored from lowest to highest the array is sorted in __________ order.
- AAscending
- BAlphabetic
- CNumeric
- DDescending
- ENone of these answers
15If an array is sorted in this order, the values are stored from highest to lowest.
- Aasymptotic
- Blogarithmic
- Cascending
- Ddescending
Information
- Description
- Computer Science Quiz on Chapter 9 multiple choice, created by Naina Minhas on 10/12/2022.
- Author
- Naina Minhas
- Language
- English
- Views
- 0
- Tags
- Rating
- No ratings yet Rate this quiz