1. Which of the following is the same as the mean?
c. arithmetic average
2. The process of reversing the positions of two variables is called ____.
3. Which of the following is considered to be a popular coding scheme?
d. All of the above
4. An array must have a(n) ____ size.
5. What is the name of the flag variable in the following code?
pairsToCompare = numberOfEls - 1
switchOccurred = "Yes"
while switchOccurred = "Yes"
x = 0
switchOccurred = "No"
while x <= pairsToCompare
if score[x] > score[x + 1] then
switchOccurred = "Yes"
x = x + 1
pairsToCompare = pairsToCompare - 1
6. What is the purpose of the flag variable in a bubble sort?
a. to eliminate unnecessary swaps
b. to eliminate unnecessary comparisons
c. to stop as soon as the list is sorted
d. to sort an array of unknown size
8. Why is a bubble sort often presented first when learning sorting
a. it is the fastest
b. it is the most efficient
c. it is easiest to understand
d. it uses fewer loops than other methods
10. In a(n) ascending ____ sort the first element in the array is assumed to be the smallest.
11. When a large amount of data needs to be sorted, it is more efficient to store the logical order and the physical address in a(n) ____ than
to sort the data.
c. memory address
d. linked list
12. What is an example of a batch program?
a. Internet browser
b. airplane reservation system
c. payroll processing system
d. word processing program
13. What is another name for an interactive program?
a. batch program
b. real-time application
c. menu program
d. offline program
14. Menus are used in ____ programs.
15. A menu without a ____ is very frustrating for a user.
a. quit option
b. save option
16. Many organizations provide a(n) ____ menu to callers to handle routing of telephone calls.
b. graphical user interface
17. Module statements that are "invisible" to the rest of the program are said to be in a(n) ____.
b. black box
c. orange triangle
18. In programming, there is a saying that no program is ever really ____.
19. When a menu contains numerous options, it is more elegant to use
a(n) ____ structure than a series of decisions.
c. if then else
20. Programs that make it easy for the user to make desired choices are
21. ____ values can hold both letters and numbers.
d. Black box
22. When using a case structure to process a menu selection, a program with four menu options will require ____ cases.
23. Programs that anticipate user errors employ ____ programming.
25. Frequently records are stored in order of their ____ field.
26. What record will appear first in a merged file created from the two files listed below?
East Coast File
West Coast File
a. Able 100.00
b. Chen 200.00
c. Grand 100.00
d. Johnson 30.00
27. What type of variable controls the main loop of a file merging program?
28. When merging, a ____ is used to determine which file the next record comes from.
29. What action does a merging program take after it writes a record from file 2?
a. writes the next entry from file 1
b. writes the next entry from file 2
c. reads the next entry from file 2
d. reads the next entry from file 1
30. When merging two files, an eof condition is detected in one file. In order to continue processing a ____ value is set in the comparison
31. Which of the following would be the best character high value?
32. Why might it be a good idea to create a copy of the master file before updating it?
a. more efficient
b. creating a copy eliminates duplicate values
c. takes less time
d. in case there are questions regarding the update process
34. When writing a program to match master and transaction methods, what should happen when the value of the master key is greater
than the transaction key?
a. an error has occurred and should be logged
b. there are no changes to the master
c. the master should be updated
d. the transaction should be updated
35. When updating a master file with data from a transaction file, what should happen for an addition record when a match is found in the
a. an update should be made
b. an error message should be printed
c. the master record should be removed
d. a new record should be added
36. What happens during a merging program when both input files contain the same value?
a. an error occurs
b. the program exits
c. two identical records will appear in the merged file
d. only one record will appear in the merged file
37. One of the benefits of ____ is that each module needs to use only the variable names declared within it, so multiple programmers can
create the individual modules without knowing the data names used
by the other modules.
39. The ____ statement passes a value back to the calling module.
41. A device that you can use without understanding the internal workings is a ____.
b. black box
c. blue triangle
42. You need to understand a subroutine's ____ in order to use it.
a. internal structure
b. local variables
c. programming style
43. The variable's ____ in no way affects how the method is called from another module.
a. local name
b. data type
44. When designing modules to use within larger programs, some programmers find it helpful to use a(n) ____ chart, a tool that
identifies and categorizes each item needed within the module as pertaining to input, processing, or output.
45. To beginning programmers, using only ____ variables seems like a far simpler option than declaring local variables and being required
to pass them from one module to another.
46. Passing values to a module helps facilitate ____.
d. black boxes
47. ____ is a feature of programs or modules that have been tested and proven to work correctly.
48. ____ cohesion occurs in modules that perform tasks that share data.
49. A module that performs tasks based on a decision statement has
50. A housekeeping routine exhibits ____ cohesion.
Gives solutions to common questions on Computer Programming and Databases. 50 questions answered.