Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
73 Cards in this Set
- Front
- Back
Which of the following is not a benefit of using modules? a. simpler code b. faster development c. code reuse d. better testing e. none of the above
|
none of the above |
|
Which sorting algorithm moves elements to their final sorted position in the array? a. bubble b. selection c. insertion d. hash e. none of the above |
selection |
|
When the elements in an array are stored from lowest to highest, the array is sorted in what order? |
ascending |
|
What sorting algorithm makes passes through and compares the elements of the array, causing certain values to move to the end of the array with each pass? |
Bubble |
|
Which searching algorithm requires the array to be ordered? |
binary |
|
Which sorting algorithm sorts the first two elements of an array before inserting the remaining elements into that sorted part of the array? |
insertion |
|
which search algorithm uses three variables to mark positions within the array as it searches for the searchValue? |
binary |
|
Which statement is true after the execution of the following statements? Set x = y Set y = x |
x contains the value in y and y stayed the same |
|
in the bubble sort algorithm, the two arguments sent into the swap module are? a. array[index] and array[index - 1] b. array[index + 1] and array[index - 1] c. array[index - 1] and array[index + 1] d. array[index - 1] and array[index] e. none of the above |
none of the above |
|
which statement is true after the execution of the following statements? Set t = x Set x = y Set y = t |
x and y swapped their values |
|
In a binary search, what is the maximum number of comparisons that need to be performed if the array contains 1000?
a. 1000 b. 500 c. 250 d. 100 e. none of the above |
none of the above |
|
in a selection sort, which variables holds the subscript of the element with the smallest value found in the scanned area of the array? |
minIndex |
|
To order an array of strings in alphabetical order, the sorting algorithm should be structured for what order? |
alphabetic/ ascending |
|
which sorting algorithm is the least efficient? |
bubble sort |
|
which search algorithm should be used on large arrays if speed is important? |
binary |
|
The module definition comprises the module header and the module... |
body |
|
The following is an example of which module? Call calculateRent() |
Call module |
|
What is the term used for the memory address of the location of the statement immediately after the module call? |
Return point |
|
What tool would a programmer use to visulaize the relationship between modules? |
Hierachy chart |
|
Passing and argument by what means that only a copy of the arguments value is passed into the parameter variable? |
by value |
|
Which type of variable is visible to every module and the entire program? |
Global |
|
Which type of variable is not recommended to be used in programs because they make programs hard to understand and degub? |
Global |
|
When an argument is passed by what, it is not affected by a change of the content of the parameter variable? |
Value |
|
Function is another name for? |
module |
|
what kind of variables are useful for establishing two-way communication between modules? |
reference variables |
|
What phrase is placed in the starting terminal symbol of a module flowchart? |
Start |
|
Modules are commonly called what? |
Procedures/ Subroutines/ Subprograms/ methods |
|
To create a module, you write this... |
Definition |
|
To execute a module, we must? |
Call it |
|
What type of loop uses a boolean expression to control the number of time that it repeats a statement or set of statements? |
count controlled |
|
Which loop repeats a statement or set of statements as long as the Boolean expression is false? |
Do-until |
|
The statements that appear bewteen the while and the end while clauses are called? |
the body of the loop |
|
Describe postest loops? |
Do-While and Do-Until |
|
What loop statement does not contain an increment statement within the body of the loop but automatically increments the counter at the end of each iteration? |
For loop |
|
The following is an example of what typoe of loop? For k = 7 to maxValue |
Count-controlled |
|
What value is a special value that marks the end of a list of values input by the user? |
Sentinel value |
|
Which loop is specifically designed to initialize, test, and increment a counter variable? |
For loop |
|
How many times will the following loop iterate? For j = 1 to 5 step 2 display j End For |
Three |
|
How many times will the following loop iterate? Set k = 1 While k <= 5 Display k End While |
Infinite |
|
How many times will the following loop iterate?
Set k = 1 While k > 5 Display k End while |
No iterations |
|
How many times will the following loop iterate? Set k = 1 Do Display k Set k = k + 1 Until k > 1 |
Once only |
|
The amount by which the counter variable is incremented in a For loop is known as what? |
Incremental value |
|
To descrease the value of a variable is to? |
Decrement |
|
A loop that accumulates a total as it reads each number from a series is often said to keep a what? |
A running total |
|
What is the famous saying among computer programmers that refers to the fact that computers cannot tell the difference between good and bad data? |
Garbage in, garbage out |
|
To get the first input value for the validation of a loop is called what? |
Priming read |
|
Designing a program to avoid common errors is called what kind of programming? |
Defensive |
|
This happens when an input operation attempts to read data, but there is no data to read. |
Input error |
|
This is commonly done with a loop that iterates as long as an input variable contains bad data. |
Input validation |
|
This is sometimes the term used for input validation |
Error trap |
|
Which of the following is not an input validation error type? a. empty input b. incorrect data type c. inaccurate data d. all of the above e. none of the above |
All of the above |
|
What is the first step to use in detecting data type mismatch errors? |
Read the input as a string |
|
Which of the following statements is true about this Boolean expression? score < 0 AND score >100 |
This expression would never be true |
|
What type of function can be used to see if the password entered has the minimum number of characters? |
String |
|
If, when asked for a date of birth, the user enters a future date, this error should be caught by what kind of check? |
Reasonableness |
|
Which library function could be used to validate the length of a string? |
Length |
|
Which library function could be used to validate that the correct data type was input for an amount of money? |
isReal |
|
Which library functions could be used to simplify the proces of string validation? |
toUpper |
|
You access the individual elements in an array by using their? |
Subscripts |
|
Some programming languages provide the specialized loop that steps through an array, retrieveing the value of each element. What is the loop called? |
For Each |
|
What must be passed when poassing an array as an argument? |
The array itself and an Integer that specifies the number of elements in the array. |
|
This array consist of two or more arrays that hold related data, and the elements are accessed using a common subscript. |
Parallel arrays |
|
How many subscripts do you need to access one element in a two-dimensional array? |
Two |
|
Two dimensional arrays can be thought of as containing these two things. |
Rows and Columns |
|
A three-dimnesional array can be thought of as what of two-dimensional arrays. |
Pages |
|
In the following declaration, what is the data type of the elements of the array? Declare Integer numbers [SIZE] |
Integer |
|
Every element in an array is assigned a unique number known as a ? |
Subscript |
|
What is true about the statement below? Declare Integer score [5] = 83, 92, 78, 94, 71 |
This is an array declaration and initialization |
|
What is the subscript for the data value 92 in the example given below? Declare Integer score [5] = 83, 92, 78, 94, 71 |
One |
|
What is the term used for the value that is searched for in a search algorithm? |
searchValue |
|
How do you pronounce the following expression: score[5]? |
Score sub 5 |
|
What array declaration would be best suited for storing the retail prices? |
Declare Real retailPrice[SIZE] |
|
When working with arrays, most programming languages perform what kind of checking? |
Arrays Bounds Checking - this means a program is not allowed to use invalid subscripts. |