Skip to main content

Starting Out With C From Control Structures Through Objects 11Th Gaddis Solutions Manual

Page 1


Solutions Manual for Starting Out with C++ from Control Structures through Objects 11th Edition by Gaddis

ISBN: 9780135905623

Starting Out with C++ from Control Structures to Objects, 11e (Gaddis)

Chapter 1 Introduction to Computers and Programming

TRUE/FALSE

1. Software engineering is a field that encompasses designing, writing, testing, debugging, documenting, modifying, and maintaining computer programs.

ANS: T

2. Pseudocode is a form of a program statement that will always evaluate to "false."

ANS: F

3. In programming, the terms "line" and "statement" always mean the same thing.

ANS: F

4. In C++, key words are written in all lowercase letters.

ANS: T

5. The preprocessor executes after the compiler.

ANS: F

6. Machine language is an example of a high-level language.

ANS: F

7. A CPU only understands machine language instructions.

ANS: T

8. Programs are often referred to as hardware.

ANS: F

9. The CPU is the most important component in a computer because without it, the computer could not run software.

ANS: T

10. The term "bit" stands for binary digit.

ANS: T

Copyright © 2027 Pearson Education, Inc. All Rights Reserved.

11 During the execute stage of the fetch/decode/execute cycle, a signal is routed to the appropriate component of the computer, causing it to perform an operation.

ANS: T

12. A Graphics Processing Unit (GPU) is designed to perform many calculations simultaneously, making it well-suited for AI, machine learning, and graphics processing.

ANS: T

13. Main memory is nonvolatile, meaning its contents are preserved even when the computer is powered off.

ANS: F

14. Cloud storage is a form of secondary storage that allows data to be accessed from multiple devices over an internet connection.

ANS: T

15. An operating system is an example of application software.

ANS: F

16. Pseudocode is a tool used during program design that combines elements of human language and a programming language to outline a program's logic.

ANS: T

17. A runtime error is always detected and reported by the compiler before the program is executed.

ANS: F

MULTIPLE CHOICE

1. What does the term hardware refer to?

a. The relative difficulty of writing computer programs

b. The physical components that make up a computer

c. The way a computer's storage space is organized

d. The logical flow of instructions

e. None of these

ANS: B

2. A(n) __________ is a set of instructions that the computer follows to solve a problem.

a. compiler

b. linker

Copyright © 2027 Pearson Education, Inc. All Rights Reserved.

c. program

d. operator

e. None of these

ANS: C

3. Computer programs are also known as

a. hardware

b. firmware

c. software

d. Any of these

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

5. A computer stores a program while it is running

a. in main memory

b. on a hard disk

c. on the computer monitor

d. in the CPU

e. None of these

ANS: A

6. The __________ decodes an instruction and generates an electronic signal.

a. Arithmetic and Logic Unit

b. Main memory

c. BIOS

d. Control Unit

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

Copyright © 2027 Pearson Education, Inc. All Rights Reserved.

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

9. 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

e. None of these

ANS: C

10. A volatile type of memory that is used for temporary storage is

a. an address

b. the ALU

c. RAM

d. a disk drive

e. None of these

ANS: C

11. The purpose of a memory address is:

a. to identify the location of a byte in memory

b. to prevent multitasking

c. to obtain an algorithm

d. to improve the speed of processing

e. None of these

ANS: A

12. During which stage of the fetch/decode/execute cycle is a signal sent to the appropriate hardware component to carry out an operation?

a. fetch

b. decode

c. execute

d. portability

e. None of these

ANS: C

13. Which of the following best describes a Graphics Processing Unit (GPU)?

a. A processor that executes one instruction at a time very quickly

b. A processor designed to perform many calculations simultaneously, used for graphics, AI, and machine learning

c. A type of volatile memory used to store running programs

d. The unit inside the CPU that coordinates all CPU operations

e. None of these

ANS: B

14 Which of the following is an example of system software?

a. A word processing program

b. A video game

c. An operating system

d. A web browser

e. None of these

ANS: C

15. A utility program is best described as

a. a program that controls the internal hardware operations of a computer

b. a program such as a virus scanner or file-compression tool that performs a specialized task

c. the compiler and linker used to translate source code

d. a program used directly by users to accomplish everyday tasks such as writing documents or browsing the web

e. None of these

ANS: B

16 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

17. A computer screen is a type of

a. input device

b. output device

c. storage device

d. software

e. None of these

ANS: A

18 Which of the following is not a common input device?

a. keyboard

b. mouse

c. camera

d. printer

e. All are common input devices

ANS: D

Copyright © 2027 Pearson Education, Inc. All Rights Reserved.

19 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

20 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

21. 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

22. 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

23 An Integrated Development Environment (IDE) typically consists of

a. a text editor

b. a compiler

c. a debugger

d. All of the above

e. None of these

ANS: D

24. A ________ is used to translate source code instructions into the machine language instructions. a. module

b. runtime library

c. compiler

d. preprocessor directive

e. None of these

ANS: C

25. 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

26 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. keywords

d. syntax

e. None of these

ANS: C

27. Which of the following best describes an operator?

a. An operator is a rule that must be followed when constructing a program.

b. An operator allows you to perform operations on one or more pieces of data.

c. An operator marks the beginning or ending of a statement or is used to separate items in a list.

d. An operator is a word that has a special meaning.

e. An operator is a symbolic name that refers to a variable.

ANS: B

28. 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

29 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

30 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

31 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

32. 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

33 Three primary activities of a program are:

a. variable definitions, operators, lists of key words

b. lines, statements, punctuation

c. input, processing, output

d. integer, floating-point, character definitions

e. None of these

ANS: C

34 Which step uncovers any syntax errors in your program?

a. editing

b. compiling

c. linking

d. executing

e. None of these

ANS: B

35. 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 programming process consists of several steps, which include:

a. key words, operator definitions, punctuation

b. design, creation, testing, debugging

c. input, processing, output

d. syntax, logic, error handling

e. None of these

ANS: B

37. What is pseudocode?

a. Another name for machine language

b. A diagram that shows the logical flow of a program

c. A cross between human language and a programming language used to plan a program's logic

d. A diagram that graphically depicts the structure of a program using boxes and connections

e. None of these

ANS: C

38. The process of breaking a program's overall task into smaller and smaller subtasks during program design is known as

a. pseudocoding

b. top-down design

c. object-oriented programming

d. desk checking

e. None of these

ANS: B

39 The first step in writing a program is to

a. type the code

b. visualize the program running on a computer

c. visualize logical errors

d. clearly define what the program is to do

e. None of these

ANS: D

40. A model often used when creating a program that begins with the overall task and refines it into smaller subtasks is a(n)

a. flowchart

b. UML diagram

c. blueprint

d. hierarchy chart

e. None of these

ANS: D

41. 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

42 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

Turn static files into dynamic content formats.

Create a flipbook
Starting Out With C From Control Structures Through Objects 11Th Gaddis Solutions Manual by dferdinan - Issuu