Chapter 10 Questions
Multiple Choice Questions
1. Which of the following is NOT part of the human cost of developing a computer program?
a. efficiency of a program
b. the the readability of a program
c. the modifiability of a program
d. the maintainability a program
2. Algorithm analysis should be independent of all of the following EXCEPT ______.
a. the programming style used in the implementation of the algorithm
b. the computer used to run a program which implements an algorithm
c. the number of significant operations in an algorithm
d. the test data used to test a program which implements an algorithm
3. An algorithm’s execution time is related to the number of ______ it requires.
a. parameters
b. test data sets
c. data fields
d. operations
4. Assuming a linked list of n nodes, the C++ statements
Node *cur = head;
while (cur != null)
{ cout << curr->item << endl;
cur = cur->next;
} // end while
require ______ assignment(s).
a. n
b. n – 1
c. n + 1
d. 1
5. Assuming a linked list of n nodes, the C++ statements
Node *cur = head;
while (cur != null)
{ cout << curr->item << endl;
cur = cur->next;
} // end while
require ______ comparison(s).
a. n
b. n – 1
c. n + 1
d. 1
6. Assuming a linked list of n nodes, the C++ statements
Node *cur = head;
while (cur != null) {
cout << curr->item << endl;
cur = cur->next;
} // end while
perform ______ write operations.