Page 1 of 66
STARTING OUT WITH C++: FROM CONTROL STRUCTURES
TO OBJECTS (10TH EDITION) — TONY GADDIS COMPLETE
REVIEW WITH VERIFIED QUESTIONS DETAILED
RATIONALES GRADED A+
Starting Out with C++: From Control Structures to Objects (10th Edition) — Tony Gaddis
Original Practice Questions — Starting Out with C++ (10th Edition)
Chapter 1: Introduction to Computers and Programming (Questions 1–15)
1. Which of the following is considered the "brain" of the computer that performs all
calculations and executes instructions?
A) RAM
B) Hard Drive
C) CPU
D) Motherboard
Answer: C
Rationale: The Central Processing Unit (CPU) performs all calculations and executes instructions.
RAM is temporary storage, the hard drive is permanent storage, and the motherboard connects
components .
2. A byte consists of how many bits?
A) 4
B) 8
C) 16
D) 32
,Page 2 of 66
Answer: B
Rationale: A bit is a binary digit (0 or 1). A byte is a group of 8 bits, enough to store one
character like 'A' or '3' .
3. Which type of memory is volatile, meaning it loses its contents when the power is turned
off?
A) ROM
B) Hard Disk
C) Flash Drive
D) RAM
Answer: D
Rationale: Random Access Memory (RAM) is temporary storage used for running programs.
ROM and storage devices retain data without power .
4. Which component is responsible for performing arithmetic operations like addition and
subtraction?
A) Control Unit
B) ALU
C) BIOS
D) Register
Answer: B
Rationale: The Arithmetic Logic Unit (ALU) handles all mathematical calculations and logical
comparisons .
5. A set of well-defined steps to solve a problem is called a(n):
A) Program
B) Syntax
C) Algorithm
D) Flowchart
Answer: C
Rationale: An algorithm is a step-by-step procedure. When written in a programming language,
it becomes a program .
,Page 3 of 66
6. Which of the following is NOT an example of an input device?
A) Keyboard
B) Mouse
C) Printer
D) Scanner
Answer: C
Rationale: A printer is an output device. It receives data from the computer rather than sending
data to it .
7. What does the linker do in the compilation process?
A) Checks for syntax errors
B) Converts high-level code to machine code
C) Combines object code with library code to create an executable
D) Runs the program
Answer: C
Rationale: After compilation, the linker puts everything together into a single runnable file (e.g.,
.exe) .
8. Which language is the closest to what the CPU actually executes?
A) C++
B) Python
C) Java
D) Machine language
Answer: D
Rationale: The CPU directly executes machine language without any translation .
9. A syntax error is:
A) An error in the logic of the program
B) An error in the grammar of the programming language
C) A runtime crash
D) An error that occurs when the program is running
, Page 4 of 66
Answer: B
Rationale: A syntax error is a violation of the programming language's grammar rules. Logic
errors produce incorrect results but the program runs .
10. The programming process begins with:
A) Writing code
B) Testing the program
C) Debugging errors
D) Defining the problem
Answer: D
Rationale: You must clearly understand what the program needs to do before you can write it .
11. The preprocessor directive #include <iostream> is necessary for:
A) Performing math operations
B) Input/output operations
C) String manipulation
D) File operations
Answer: B
Rationale: iostream stands for "input/output stream" and provides cin and cout functionality .
12. The two parts of the CPU are:
A) The output device and the input device
B) The software and the hardware
C) The Control Unit and the Arithmetic and Logic Unit
D) The single-task device and the multi-task device
Answer: C
Rationale: The CPU consists of the Control Unit (fetches and decodes instructions) and the
Arithmetic and Logic Unit (performs calculations) .
13. Programs are normally stored in __________ and loaded into main memory as needed.
A) The input device
B) The output device
STARTING OUT WITH C++: FROM CONTROL STRUCTURES
TO OBJECTS (10TH EDITION) — TONY GADDIS COMPLETE
REVIEW WITH VERIFIED QUESTIONS DETAILED
RATIONALES GRADED A+
Starting Out with C++: From Control Structures to Objects (10th Edition) — Tony Gaddis
Original Practice Questions — Starting Out with C++ (10th Edition)
Chapter 1: Introduction to Computers and Programming (Questions 1–15)
1. Which of the following is considered the "brain" of the computer that performs all
calculations and executes instructions?
A) RAM
B) Hard Drive
C) CPU
D) Motherboard
Answer: C
Rationale: The Central Processing Unit (CPU) performs all calculations and executes instructions.
RAM is temporary storage, the hard drive is permanent storage, and the motherboard connects
components .
2. A byte consists of how many bits?
A) 4
B) 8
C) 16
D) 32
,Page 2 of 66
Answer: B
Rationale: A bit is a binary digit (0 or 1). A byte is a group of 8 bits, enough to store one
character like 'A' or '3' .
3. Which type of memory is volatile, meaning it loses its contents when the power is turned
off?
A) ROM
B) Hard Disk
C) Flash Drive
D) RAM
Answer: D
Rationale: Random Access Memory (RAM) is temporary storage used for running programs.
ROM and storage devices retain data without power .
4. Which component is responsible for performing arithmetic operations like addition and
subtraction?
A) Control Unit
B) ALU
C) BIOS
D) Register
Answer: B
Rationale: The Arithmetic Logic Unit (ALU) handles all mathematical calculations and logical
comparisons .
5. A set of well-defined steps to solve a problem is called a(n):
A) Program
B) Syntax
C) Algorithm
D) Flowchart
Answer: C
Rationale: An algorithm is a step-by-step procedure. When written in a programming language,
it becomes a program .
,Page 3 of 66
6. Which of the following is NOT an example of an input device?
A) Keyboard
B) Mouse
C) Printer
D) Scanner
Answer: C
Rationale: A printer is an output device. It receives data from the computer rather than sending
data to it .
7. What does the linker do in the compilation process?
A) Checks for syntax errors
B) Converts high-level code to machine code
C) Combines object code with library code to create an executable
D) Runs the program
Answer: C
Rationale: After compilation, the linker puts everything together into a single runnable file (e.g.,
.exe) .
8. Which language is the closest to what the CPU actually executes?
A) C++
B) Python
C) Java
D) Machine language
Answer: D
Rationale: The CPU directly executes machine language without any translation .
9. A syntax error is:
A) An error in the logic of the program
B) An error in the grammar of the programming language
C) A runtime crash
D) An error that occurs when the program is running
, Page 4 of 66
Answer: B
Rationale: A syntax error is a violation of the programming language's grammar rules. Logic
errors produce incorrect results but the program runs .
10. The programming process begins with:
A) Writing code
B) Testing the program
C) Debugging errors
D) Defining the problem
Answer: D
Rationale: You must clearly understand what the program needs to do before you can write it .
11. The preprocessor directive #include <iostream> is necessary for:
A) Performing math operations
B) Input/output operations
C) String manipulation
D) File operations
Answer: B
Rationale: iostream stands for "input/output stream" and provides cin and cout functionality .
12. The two parts of the CPU are:
A) The output device and the input device
B) The software and the hardware
C) The Control Unit and the Arithmetic and Logic Unit
D) The single-task device and the multi-task device
Answer: C
Rationale: The CPU consists of the Control Unit (fetches and decodes instructions) and the
Arithmetic and Logic Unit (performs calculations) .
13. Programs are normally stored in __________ and loaded into main memory as needed.
A) The input device
B) The output device