1. (TCO 1) In what stage of the programming process are flowcharts and pseudocode used? (Points: 5)
Understand the problem
Plan the logic
Code the program
Test the program
2. (TCO 1) ______is/are an excellent tool for beginning programmers because it is helpful to visualize how statements in a program are interrelated?
(Points: 5)
Pseudocode
Flowcharts
Walkthroughs
Database diagrams
3. (TCO 1) Which of the following is not a necessary structure when creating a program? (Points: 5)
sequence
selection
looping
case
4. (TCO 1) What pseudocode keyword is used to indicate the end of a decision control structure? (Points: 5)
endwhile
endif
enddec
end
5. (TCO 1) In a single-alternative if statement, there is not a(n) ______. (Points: 5)
default value
null case
missing element
else statement
6. (TCO 1) Which of the following is NOT another name for a module? (Points: 5)
subroutine
procedure
function
block
7. (TCO 1) What is the flowchart symbol for a module? (Points: 5)
a circle
a rectangle with a bar across the top
a parallelogram
a triangle
8. (TCO 1) A variable that is declared once and used in all modules belonging to a program is a ____ variable. (Points: 5)
local
normal
default
global
9. (TCO 1) A(n) ____ program is a program in which one procedure follows another. (Points: 5)
procedural
object-oriented
modular
logical
10. (TCO 2) What decision structure is logically equivalent to the following:
if customerCode not equal to 1 then
discount = 0.25
else
discount = 0.50
endif (Points: 5)
if customerCode > 1 then
discount = 0.50
else
discount = 0.25
endif
if customerCode = 1 then
discount = 0.50
else
discount = 0.25
endif
if customerCode < 1 then
discount = 0.50
else
discount = 0.25
endif
if customerCode = 1 then
discount = 0.20
else
discount = 0.50
endif
11. (TCO 2) What Logic operator could be used to replace the nested selection structure in this psuedocode:
if empMedicalIns = "Y" then
if empDentalIns = "Y" then
print empIdNumber, empLastName, empFirstName
endif
endif (Points: 5)
dual-alternative selection
logical AND
logical OR
logical not
12. (TCO 2) The following pseudocode reads a number from the user, multiplies it by 2 and prints the result. What program statement should replace the ? to make this program functional and structured?
start
get inputNumber
while not eof
calculatedAnswer = inputNumber * 2
print calculatedAnswer
?
endwhile
stop
(Points: 5)
no statement is needed
if done then exit
print inputNumber
get inputNumber
13. (TCO 2) What is another name for a selection structure? (Points: 5)
decision
repetition
loop
recursion
14. (TCO 2) What syntax is involved in defining a dual-alternative selection? (Points: 5)
if-then
repeat
while
if-then-else
15. (TCO 2) In a decision structure, the ____ clause executes when the decision condition is false. (Points: 5)
case
else
if
or
16. (TCO 2) Which piece of pseudocode represents checking the loop condition? (Points: 5)
rep = 1
while (rep < 5)
rep = rep + 1
print "warning"
17. (TCO 2) Which piece of pseudocode represents incrementing the loop control variable? (Points: 5)
rep = 1
while (rep < 5)
rep = rep + 1
print "warning"
18. (TCO 2) A loop control variable that is incremented a specific number of times is known as a(n) ____. (Points: 5)
sentinel
trivial comparison
indefinite value
counter
19. (TCO 2) Which of the following comparisons is generally most confusing? (Points: 5)
greater than
equal to
less than
not equal to
20. (TCO 2) Which of the following is NOT automatically handled by the For/Loop? (Points: 5)
initializes loop control variable
increments loop control variable
compares loop control variable
input/output statements
21. (TCO 3) What file extensions are used to identify command shell scripts? (Points: 5)
vbs and js
cmd and bat
txt and bat
txt and pdf
22. (TCO 3) What does the shells echo command do? (Points: 5)
Sends messages across the network
Copies a file
Displays messages
Is a carbon copy feature
23. (TCO 3) Batch files are stored as? (Points: 5)
Compiled program code
Plain text files
Binary programs
Word documents
24. (TCO 3) Which Windows shell command allows you to view the shell's environmental variables from the command prompt?
(Points: 5)
set
ls
view
list
25. (TCO 4) What shell script operator allows you to redirect the output of a command to a text file? (Points: 5)
|
>
&
echo
26. (TCO 4) What is the VB Script comment character? (Points: 5)
!
'
::
#
27. (TCO 4) Linux shell scripts are stored as? (Points: 5)
Compiled program code
Plain text files
Binary programs
Word documents
28. (TCO 5) Which is not true of script security problems?
(Points: 5)
Scripts have access to a wide variety of computer resources
Scripts can be executed unintentionally
Scripts are safe as long as they are signed
Scripting is used in a majority of the computer viruses
29. (TCO 6) Records stored in tables where each record can be linked to a record in another table is known as a (Points: 5)
relational database
hierarchal database
simplex database
flat database
30. (TCO 7) What task(s) are involved in designing a database table? (Points: 5)
naming each row
naming each column
naming each column and providing data types
inserting all the data
31. (TCO 7) The unnecessary repetition of data is called data ______. (Points: 5)
amplification
echoing
redundancy
mining
32. (TCO 7) What is another name for a record in a database? (Points: 5)
character
column
row
table
33. (TCO 2) An array stores a(n) _____ in memory. (Points: 5)
list of values
single value
character value
floating point value
34. (TCO 2) What is the term for the number used to reference an array element? (Points: 5)
variable
index
element
superscript
35. (TCO 2) What is a counter and how is it used? How does the value of the counter change as a loop is executed? How is a counter different from an Accumulator? Provide a pseudocode example of a loop that utilizes a counter and accumulator. (Points: 20)
36. (TCO 2) What is the differences between a while-loop and a for-loop? Provide a pseudocode example of how to use each of these loops to count from 1 to 10? (Points: 20)
For-loop is used when we know exactly how many times a certain block of code will be executed.
While-loop is used when we don’t know how many times a certain block of code will be executed.
Int count
For int x = 1 to x = 10
Count++
Next
Int count
Int x = 1
While x <= 10
Count++
Next
37. (TCO 6,7) Explain two disadvantages of using a flat database instead of a relational database? (Points: 20)
- Can be stored in only one location
- Hard to recover when corrupted
- Access mode is sequential, gets slower as the database grows
- Dataredundancy