Programming - C++ Language

You Are Here :: Home > C++ Language > Arrays - General Questions

 
49.

Consider the following list.,br>list = {20, 10, 17, 2, 18, 35, 30, 90, 48, 47};
Suppose that a sequential search as discussed in the book is used to determine whether 2 is in list. Exactly how many key comparisons are executed by the sequential search algorithm?                         


A. 3 B. 4
C. 5 D. None of these




50.

Consider the following list.
list = {20, 10, 17, 2, 18, 35, 30, 90, 48, 47};
Suppose that a sequential search as discussed in the book is used to determine whether 95 is in list. Exactly how many key comparisons are executed by the sequential search algorithm?                         


A. 1 B. 8
C. 10 D. None of these




51.

Consider the following list.
ist = {24, 20, 10, 75, 70, 18, 60, 35}
Suppose that list is sorted using the selection sort algorithm as discussed in the book. What is the resulting list after two passes of the sorting phase, that is, after two iterations of the outer for loop?                         


A. list = {10, 18, 24, 20, 75, 70, 60, 35} B. list = {10, 18, 20, 24, 75, 70, 60, 35}
C. list = {10, 18, 24, 75, 70, 20, 60, 35} D. None of these




52.

Consider the following list
list = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};
Suppose that a sequential search on an ordered list as discussed in the book is used to determine whether 40 is in list. Exactly how many key comparisons are executed by this search algorithm?                         


A. 3 B. 4
C. 5 D. None of these




53.

Consider the following list.
list = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};
Suppose that a sequential search on an ordered list as discussed in the book is used to determine whether 55 is in list. Exactly how many key comparisons are executed by this search algorithm?                         


A. 5 B. 6
C. 10 D. None of these




54.

Consider the following list.
ist = {10, 20, 30, 40, 50, 60, 70, 80, 90, 100};
Suppose that a sequential search on an ordered list as discussed in the book is used to determine whether 120 is in list. Exactly how many key comparisons are executed by this search algorithm?                         


A. 10 B. 11
C. 12 D. None of these




« prev

1

2

3

4

5

6

7

8

9

next »

 
 



© 2013 freshersindia.in ® | Copyrights | Terms & Conditions
   Designed by Freshers India
Catch Us on