ch01 - Drake Test Bank For Starting Out With C From Control Structures To Objects 9th
ch01 - Drake Test Bank For Starting Out With C From Control Structures To Objects 9th
TRUE/FALSE
1. Software engineering is a field that encompasses designing, writing, testing, debugging, documenting,
modifying, and maintaining computer programs.
ANS: T
ANS: F
3. In programming, the terms "line" and "statement" always mean the same thing.
ANS: F
ANS: T
ANS: F
ANS: F
ANS: T
ANS: F
9. The CPU is the most important component in a computer because without it, the computer could not
run software.
ANS: T
ANS: T
MULTIPLE CHOICE
2. A(n) __________ is a set of instructions that the computer follows to solve a problem.
a. compiler
b. linker
c. program
d. operator
e. None of these
ANS: C
4. At the heart of a computer is its central processing unit. The CPU's job is:
a. To fetch instructions
b. To carry out the operations commanded by the instructions
c. To produce some outcome or resultant information
d. All of these
e. None of these
ANS: D
7. The CPU's control unit retrieves the next instruction in a sequence of program instructions from main
memory in the __________ stage.
a. fetch
b. decode
c. execute
d. portability
ANS: A
8. During which stage does the central processing unit analyze the instruction and encode it in the form
of a number, and then generate an electronic signal?
a. fetch
b. decode
c. execute
d. portability
ANS: B
12. Programs are normally stored in __________ and loaded into main memory as needed.
a. the input device
b. the output device
c. secondary storage
d. the CPU
e. None of these
ANS: C
15. Which of the following is not one of the major components of a computer system?
a. the preprocessor
b. the CPU
c. main memory
d. input/output devices
e. secondary storage
ANS: A
16. A set of well-defined steps for performing a task or solving a problem is known as a(n):
a. hierarchy chart
b. algorithm
c. instruction set
d. statement
e. None of these
ANS: B
17. When a programmer saves to a file the statements he or she writes to create a program, these
statements are
a. high level
b. source code
c. a preprocessor file
d. object code
e. None of these
ANS: B
18. The programmer usually enters source code into a computer with
a. a hierarchy chart
b. a text editor
c. a compiler
d. pseudocode
e. None of these
ANS: B
19. In the process of translating a source file into an executable file, which of the following is the correct
sequence?
a. Source code, preprocessor, modified source code, linker, object code, compiler, executable
code
b. Preprocessor, source code, compiler, executable code, linker, modified source code, object
code
c. Source code, compiler, modified source code, preprocessor, object code, linker, executable
code.
d. Source code, preprocessor, modified source code, compiler, object code, linker, executable
code.
e. Source code, linker, object code, compiler, modified source code, preprocessor, executable
code.
ANS: D
21. ________ are used to translate each source code instruction into the appropriate machine language
instruction.
a. modules
b. runtime libraries
c. compilers
d. preprocessor directives
e. None of these
ANS: C
22. This is a set of rules that must be followed when constructing a program:
a. syntax
b. punctuation
c. key words
d. operators
e. identifiers
ANS: A
23. Words that have a special meaning and may be used only for their intended purpose are known as
a. operators
b. programmer defined words
c. key words
d. syntax
e. None of these
ANS: C
25. This is used in a program to mark the beginning or ending of a statement, or separate items in a list:
a. separators
b. punctuation
c. operators
d. key words
e. None of these
ANS: B
26. Characters or symbols that perform operations on one or more operands are:
a. separators
b. op codes
c. operators
d. key words
e. None of these
ANS: C
27. This is a complete instruction that causes the computer to perform some action:
a. line
b. statement
c. variable
d. key word
e. None of these
ANS: B
28. A named storage location in the computer's memory that holds a piece of information is a(n):
a. variable
b. operator
c. key word
d. statement
e. None of these
ANS: A
29. A variable definition defines the name of a variable that will be used in a program, as well as:
a. the type of data it will be used to hold
b. the operators that will be used on it
c. the number of times it will be used in the program
d. the value it will hold
e. None of these
ANS: A
32. Mistakes that cause a running program to produce incorrect results are called:
a. syntax errors
b. logic errors
c. compiler errors
d. linker errors
e. None of these
ANS: B
36. The term that refers to the programmer reading the program from the beginning and stepping through
each statement is
a. pseudocoding
b. software engineering
c. desk checking
d. spot checking
e. None of these
ANS: C
37. The two methods used by C++ to write computer programs are:
a. top-down programming and procedural programming
b. procedural programming and object-oriented programming
c. pseudocoding and object-oriented programming
d. flowcharting and procedural programming
e. None of these
ANS: B