CS 159 Lab 12

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/18

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

19 Terms

1
New cards

The memory address represented by the name of an array is added to the index value specified to determine where in memory the desired element can be found.

True

2
New cards

All elements of one array can be assigned to another through the use of the assignment operator and the name of each array (example: x = y).

False

3
New cards

While the default technique of passing array elements is by value it is possible to pass elements by address using the & operator (and the * operator in the function being called).

True

4
New cards

If more than one element of an array is passed to a function in a single function call then those elements are passed by address.

False

5
New cards

Using the name of an array in the data list of a single printf function will result in the output of all elements of the array.

False

6
New cards

All arrays sent to a given function must be of the same defined size.

False

7
New cards

The selection sorting algorithm will complete at most one exchange involving two elements per pass.

True

8
New cards

The selection sorting algorithm can only be used to sort data in an ascending order (from smallest to largest).

False

9
New cards

On the final pass through the selection sorting algorithm TWO values are brought over from the unsorted list into the sorted list.

True

10
New cards

The bubble sorting algorithm compares neighboring elements in the unsorted list of the array and swaps their positions when they are not in the desired order.

True

11
New cards

The bubble sorting algorithm is optimized to stop the process when the array is detected as being sorted.

False

12
New cards

Once the insertion sort places a value in the sorted list that value will never move again in the remainder of the passes.

False

13
New cards

The insertion sorting algorithm begins with one value in the sorted list before the first pass.

True

14
New cards

To sort an array of SIZE elements a total of SIZE - 1 passes are required to guarantee that the data is sorted using the selection, bubble, or insertion sort.

True

15
New cards

When an array is not sorted and the data in the array is unique the linear searching algorithm requires every element to be compared with the target before it can be concluded that the target is not present in the array.

True

16
New cards

The binary searching algorithm will always find a target in an array faster than the linear searching algorithm.

False

17
New cards

The binary searching algorithm will terminate when the first variable is greater than the last.

True

18
New cards

The linear and binary searching algorithms perform in the same amount of time that a given value is not present in an array.

False

19
New cards

The binary searching algorithm should always be used for searching.

False