Programming Logic & Design Final
Exam Chapters 1-6 Questions with
Verified Answers
The value stored in an uninitialized variable is _________.
Select one:
a. compost
b. null
c. its identifier
d. garbage - ANSWER-d. garbage
The value 3 is a ___________.
Select one:
a. numeric constant
b. numeric variable
c. string variable
d. string constant - ANSWER-a. numeric constant
The assignment operator ___________.
Select one:
a. is a binary operator
b. has left-to-right associativity
c. is most often represented by a colon
d. two of the above - ANSWER-a. is a binary operator
Multiplication has a lower precedence than _____.
Select one:
a. division
b. subtraction
c. assignment
d. none of the above - ANSWER-d. none of the above
Which of the following is not a term used as a synonym for module?
Select one:
a. procedure
b. method
c. subroutine
d. object - ANSWER-d. object
Modularization _____.
Select one:
a. reduces overhead
b. eliminates abstraction
c. facilitates reusability
,d. increases the need for correct syntax - ANSWER-c. facilitates reusability
What is the name for the process of paying attention to important properties while
ignoring nonessential details?
Select one:
a. extraction
b. modularization
c. abstraction
d. extinction - ANSWER-c. abstraction
Every module has all of the following except___________ .
Select one:
a. a body
b. a header
c. a return statement
d. local variables - ANSWER-d. local variables
Programmers say that one module can ___________ another, meaning that the first
module causes the second module to execute.
Select one:
a. declare
b. call
c. define
d. enact - ANSWER-b. call
In most modern programming languages, a variable or constant that is declared in a
module is ___________ in that module.
Select one:
a. undefined
b. invisible
c. global
d. in scope - ANSWER-d. in scope
Which of the following is not a typical housekeeping task?
Select one:
a. printing summaries
b. opening files
c. displaying report headings
d. displaying instructions - ANSWER-a. printing summaries
A hierarchy chart tells you ___________.
Select one:
a. which modules call other modules
b. what tasks are to be performed within each program module
c. when a module executes
d. all of the above - ANSWER-a. which modules call other modules
What are nonexecuting statements that programmers place within code to explain
program statements in English?
Select one:
, a. pseudocode
b. comments
c. trivia
d. user documentation - ANSWER-b. comments
Program comments are ___________.
Select one:
a. required to create a runnable program
b. a form of external documentation
c. both of the above
d. none of the above - ANSWER-d. none of the above
Which of the following is valid advice for naming variables?
Select one:
a. To make names easier to read, separate long names by using underscores or
capitalization for each new word.
b. To save typing, make most variable names one or two letters.
c. To avoid conflict with names that others are using, use unusual or
unpronounceable names.
d. To maintain your independence, shun the conventions of your organization. -
ANSWER-a. To make names easier to read, separate long names by using
underscores or capitalization for each new word.
A message that asks a user for input is a(n) ___________.
Select one:
a. prompt
b. declaration
c. comment
d. echo - ANSWER-a. prompt
Snarled program logic is called _____________ code.
Select one:
a. gnarly
b. snake
c. spaghetti
d. linguini - ANSWER-c. spaghetti
The three structures of structured programming are _____________.
Select one:
a. loop, iteration, and refraction
b. sequence, selection, and loop.
c. decision, loop, and iteration
d. sequence, order, and process - ANSWER-b. sequence, selection, and loop.
A sequence structure can contain _____________.
Select one:
a. any number of tasks
b. exactly three tasks
c. only one task
d. no more than three tasks - ANSWER-a. any number of tasks
Exam Chapters 1-6 Questions with
Verified Answers
The value stored in an uninitialized variable is _________.
Select one:
a. compost
b. null
c. its identifier
d. garbage - ANSWER-d. garbage
The value 3 is a ___________.
Select one:
a. numeric constant
b. numeric variable
c. string variable
d. string constant - ANSWER-a. numeric constant
The assignment operator ___________.
Select one:
a. is a binary operator
b. has left-to-right associativity
c. is most often represented by a colon
d. two of the above - ANSWER-a. is a binary operator
Multiplication has a lower precedence than _____.
Select one:
a. division
b. subtraction
c. assignment
d. none of the above - ANSWER-d. none of the above
Which of the following is not a term used as a synonym for module?
Select one:
a. procedure
b. method
c. subroutine
d. object - ANSWER-d. object
Modularization _____.
Select one:
a. reduces overhead
b. eliminates abstraction
c. facilitates reusability
,d. increases the need for correct syntax - ANSWER-c. facilitates reusability
What is the name for the process of paying attention to important properties while
ignoring nonessential details?
Select one:
a. extraction
b. modularization
c. abstraction
d. extinction - ANSWER-c. abstraction
Every module has all of the following except___________ .
Select one:
a. a body
b. a header
c. a return statement
d. local variables - ANSWER-d. local variables
Programmers say that one module can ___________ another, meaning that the first
module causes the second module to execute.
Select one:
a. declare
b. call
c. define
d. enact - ANSWER-b. call
In most modern programming languages, a variable or constant that is declared in a
module is ___________ in that module.
Select one:
a. undefined
b. invisible
c. global
d. in scope - ANSWER-d. in scope
Which of the following is not a typical housekeeping task?
Select one:
a. printing summaries
b. opening files
c. displaying report headings
d. displaying instructions - ANSWER-a. printing summaries
A hierarchy chart tells you ___________.
Select one:
a. which modules call other modules
b. what tasks are to be performed within each program module
c. when a module executes
d. all of the above - ANSWER-a. which modules call other modules
What are nonexecuting statements that programmers place within code to explain
program statements in English?
Select one:
, a. pseudocode
b. comments
c. trivia
d. user documentation - ANSWER-b. comments
Program comments are ___________.
Select one:
a. required to create a runnable program
b. a form of external documentation
c. both of the above
d. none of the above - ANSWER-d. none of the above
Which of the following is valid advice for naming variables?
Select one:
a. To make names easier to read, separate long names by using underscores or
capitalization for each new word.
b. To save typing, make most variable names one or two letters.
c. To avoid conflict with names that others are using, use unusual or
unpronounceable names.
d. To maintain your independence, shun the conventions of your organization. -
ANSWER-a. To make names easier to read, separate long names by using
underscores or capitalization for each new word.
A message that asks a user for input is a(n) ___________.
Select one:
a. prompt
b. declaration
c. comment
d. echo - ANSWER-a. prompt
Snarled program logic is called _____________ code.
Select one:
a. gnarly
b. snake
c. spaghetti
d. linguini - ANSWER-c. spaghetti
The three structures of structured programming are _____________.
Select one:
a. loop, iteration, and refraction
b. sequence, selection, and loop.
c. decision, loop, and iteration
d. sequence, order, and process - ANSWER-b. sequence, selection, and loop.
A sequence structure can contain _____________.
Select one:
a. any number of tasks
b. exactly three tasks
c. only one task
d. no more than three tasks - ANSWER-a. any number of tasks