Name:     ID: 
 
    Email: 

MidTerm Exam

True/False
Indicate whether the sentence or statement is true or false.
 

 1. 

No matter which programming language a computer programmer uses, the language has rules governing its word usage and punctuation.
 

 2. 

With a selection structure, you perform an action or task, and then you perform the next action, in order.
 

 3. 

In a structured program, any structure can be nested within another structure.
 

 4. 

When you write a series of decisions using the case structure, the computer still makes a series of individual decisions.
 

 5. 

It is easy for beginning programmers to distinguish among while, do-while, and do-until loops.
 

 6. 

When a data dictionary is created, it becomes part of the program documentation.
 

Multiple Choice
Identify the letter of the choice that best completes the statement or answers the question.
 

 7. 

____ errors are detected by a compiler.
a.
Logic
c.
Input
b.
Syntax
d.
Process
 

 8. 

Typically, a programmer develops a program’s logic, writes the code, and then ____ the program, which may generate a list of syntax errors.
a.
runs
c.
executes
b.
compiles
d.
tests
 

 9. 

Using ____ involves writing down all the steps you will use in a program.
a.
a compiler
c.
a flowchart
b.
an interpreter
d.
pseudocode
 

 10. 

What symbol is used to represent output in a flowchart?
a.
square
c.
parallelogram
b.
circle
d.
triangle
 

 11. 

A variable name is also called a(n) ____.
a.
placeholder
c.
constant
b.
identifier
d.
hexadecimal
 

 12. 

What is the best choice for a variable name representing an interest rate?
a.
i
c.
interest
b.
ir
d.
interest rate
 

 13. 

If a flowchart has six processing steps and a page provides room for only three, you can use a ____ to create the completed flowchart.
a.
decision symbol
c.
connector
b.
lozenge
d.
terminator
 

 14. 

What is an example of a string constant?
a.
1
c.
“oops”
b.
12432
d.
o
 

 15. 

In some programming languages, programmers must write a variable ____ telling the compiler what data type is expected for the variable.
a.
name
c.
decision
b.
termination
d.
declaration
 

 16. 

The following pseudocode is an example of a(n) ____ structure:
  get number
  get another number
  if first number is bigger than second then
    print first number
  else
    print second number
a.
sequence
c.
loop
b.
decision
d.
nested
 

 17. 

The following pseudocode is an example of a(n) ____ structure:
  get number
  get another number
  add numbers
  print result
a.
sequence
c.
loop
b.
decision
d.
nested
 

 18. 

What is the maximum number of entry points that any programming structure can have?
a.
zero
c.
three
b.
one
d.
five
 

 19. 

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
a.
no statement is needed
c.
get inputNumber
b.
if done then exit
d.
print inputNumber
 

 20. 

Structured programs can be easily broken down into routines or ____ that can be assigned to any number of programmers.
a.
segments
c.
units
b.
modules
d.
sequences
 

 21. 

Fill in the blank in the following pseudocode:

if someCondition is true then
   do oneProcess
____
   do theOtherProcess
a.
then
c.
do
b.
while
d.
else
 

 22. 

A case structure can be replaced by one or more ____ structures.
a.
if-then-else
c.
do-until
b.
do-while
d.
while
 

 23. 

____ is the process of paying attention to important properties while ignoring nonessential details.
a.
Abstraction
c.
Reusability
b.
Modularization
d.
Direction
 

 24. 

Newer ____ programming languages allow you to use English-like vocabulary in which one broad statement corresponds to dozens of machine instructions.
a.
low-level
c.
assembly
b.
high-level
d.
machine
 

 25. 

____ is the feature of programs that assures you a module has been tested and proven to function correctly.
a.
Modularization
c.
Reliability
b.
Abstraction
d.
Reusability
 

 26. 

Which name is best suited to a module that calculates overtime pay?
a.
calcO()
c.
calculate overtime()
b.
cO()
d.
calculateOvertime()
 

 27. 

Which statement is used to indicate the end of a module?
a.
stop
c.
return
b.
end
d.
done
 

 28. 

What must be identified when declaring a variable?
a.
variable name only
c.
variable name and data type
b.
variable data type only
d.
variable name, data type, and purpose
 

 29. 

A variable that is used in all program modules is ____.
a.
local
c.
non-modular
b.
shared
d.
global
 

 30. 

People who use computer programs are called ____.
a.
managers
c.
stakeholders
b.
programmers
d.
end users
 

 31. 

Which documentation is typically written first?
a.
input
c.
internal program
b.
output
d.
external program
 

 32. 

You can design a printed report on a ____.
a.
printer layout
c.
print character layout
b.
print performance chart
d.
printer spacing chart
 

 33. 

In a ____ program, the user sees a screen and can typically make selections using a mouse or other pointing device.
a.
reusable
c.
GUI
b.
modular
d.
command-line
 

 34. 

If you are producing a report from stored data, you frequently will be provided with a(n) ____ that describes the data contained in a file.
a.
summary
c.
input file
b.
data dictionary
d.
file description
 

 35. 

If a subroutine or function is useful and well-written, you may want to use it more than once within a program or in other programs.  This is known as ____.
a.
reliability
c.
abstraction
b.
scalability
d.
reusability
 

Completion
Complete each sentence or statement.
 

 36. 

A group of statements that execute as a single unit is called a(n) ____________________.
 

 

 37. 

You usually use the case structure only when a series of decisions is based on different values stored in a(n) ____________________ variable.
 

 

 38. 

Most programs contain a main module that contains the ____________________ logic; this module then accesses other modules or subroutines.
 

 

 39. 

____________________ documentation includes all the manuals or other instructional materials that nontechnical people use, as well as the operating instructions that computer operators and data-entry personnel need.
 

 

Matching
 
 
Match each term with the correct statement below.
a.
volatile memory
f.
character
b.
software
g.
hardware
c.
syntax error
h.
flowchart
d.
machine language
i.
internal storage
e.
file
 

 40. 

pictorial representation of the logical steps it takes to solve a problem
 

 41. 

instructions that tell the computer what to do
 

 42. 

misuse of a language’s grammar rules
 

 43. 

computer’s on/off circuitry language
 

 44. 

often referred to as memory
 

 45. 

groups of records that go together for some logical reason
 
 
Match each term with the correct statement below.
a.
global variables
f.
annotation symbol
b.
main program
g.
local variables
c.
data dictionary
h.
hierarchy chart
d.
comments
i.
declaring a variable
e.
reusability
 

 46. 

illustrates modules’ relationships
 

 47. 

allows individual modules to be used in a variety of applications
 

 48. 

nonexecuting statements that programmers place within their code to explain program statements in English
 

 49. 

program that runs from start to stop and calls other modules
 

 50. 

variables that are given a type and name once, and then used in all modules of the program
 

 51. 

list of every variable name used in a program
 

Short Answer
 

 52. 

What is a variable?  How is it used in a program?
 

 53. 

What is a decision in a computer program?  How is a decision represented in a flowchart?
 

 54. 

Computers deal with two basic types of data.  What are they?
 

 55. 

Why is it best to use only three programming structures?
 

 56. 

What is a hierarchy chart?
 

 57. 

What is output documentation?
 



 
Submit          Reset Help