The potential round-off errors are common if the user is not careful when the user uses the equality operator to compare floating point values.
a. true
b. false
Answers for C++ Course using "Starting out with C++ : from control structures through objects" by Tony Gaddis. 7/8th ed. I used the Pearson myprogramminglab to complete the homework. Here are my solutions/answers for the exercises/labs so please use the test bank as a GUIDE if you're stuck. Let me know if you find a better solution to a problem or any of the programming challenges. Thanks in advance for your support! Send in missing programming challenges to cplusplus.answers@gmail.com
Chapter 4 Quiz Starting Out With C++ 033
What is the operator that can be used for the logical AND ?
a. &&
b. ++
c. ||
d. @
e. AND
a. &&
b. ++
c. ||
d. @
e. AND
Exericse Number
Chapter 04,
Quiz
Chapter 4 Quiz Starting Out With C++ 032
What is the value for a relational operation when it is not true?
a. one
b. zero
c. zero, one, or minus one
d. less than zero
a. one
b. zero
c. zero, one, or minus one
d. less than zero
Chapter 4 Quiz Starting Out With C++ 031
The following C++ statement will let the variable decide where the program will go to.
a. select
b. associative
c. scope
d. switch
e. none of the above
a. select
b. associative
c. scope
d. switch
e. none of the above
Exericse Number
Chapter 04,
Quiz
Chapter 4 Quiz Starting Out With C++ 030
When you use input values, the user should check for the following:
a. Appropriate range
b. Reasonableness
c. Division by zero, if division is taking place
d. All of these
e. None of the above
a. Appropriate range
b. Reasonableness
c. Division by zero, if division is taking place
d. All of these
e. None of the above
Exericse Number
Chapter 04,
Quiz
Chapter 4 Quiz Starting Out With C++ 029
An if statement considers true any value that is NOT 0 (ZERO)
a. true
b. false
a. true
b. false
Chapter 4 Quiz Starting Out With C++ 028
When a user writes an if statement, the user should indent the statements that get executed conditionally based on programming style.
a. true
b. false
a. true
b. false
Chapter 4 Quiz Starting Out With C++ 027
The switch statement does not require the default section.
a. true
b. false
a. true
b. false
Exericse Number
Chapter 04,
Quiz
Chapter 4 Quiz Starting Out With C++ 026
If a conditionally-executed code of another if statement contains an if statement, this is called:
a. complexity
b. overloading
c. nesting
d. validation
a. complexity
b. overloading
c. nesting
d. validation
Chapter 4 Quiz Starting Out With C++ 025
You can ____________ numbers with relational operators.
a. average
b. add
c. multiply
d. compare
a. average
b. add
c. multiply
d. compare
Exericse Number
Chapter 04,
Quiz
Chapter 4 Quiz Starting Out With C++ 024
What operators can you choose to subtract 1 from their operands.
a. unary
b. minus
c. --
d. relational
a. unary
b. minus
c. --
d. relational
Exericse Number
Chapter 04,
Quiz
Chapter 4 Quiz Starting Out With C++ 023
You may nest for loops like the while and do-while loops.
a. true
b. false
a. true
b. false
Exericse Number
Chapter 04,
Quiz
Chapter 4 Quiz Starting Out With C++ 022
An initialization expression may be omitted from the for loop if initialization is required.
a. true
b. false
a. true
b. false
Exericse Number
Chapter 04,
Quiz
Chapter 4 Quiz Starting Out With C++ 021
The condition that is tested by a while loop must be enclosed in parentheses and terminated with a semicolon.
a. True
b. False
a. True
b. False
Exericse Number
Chapter 04,
Quiz
Chapter 4 Quiz Starting Out With C++ 020
Using the following word, we mean that we add 1 to the value.
a. modulus
b. decrement
c. increment
d. parse
a. modulus
b. decrement
c. increment
d. parse
Exericse Number
Chapter 04,
Quiz
Chapter 4 Quiz Starting Out With C++ 019
What is the name of a loop that is inside another one?
a. an infinite loop
b. a pre-test loop
c. a nested loop
d. a post-test loop
a. an infinite loop
b. a pre-test loop
c. a nested loop
d. a post-test loop
Exericse Number
Chapter 04,
Quiz
Chapter 4 Quiz Starting Out With C++ 018
Which of the following is an important part of a while loop:
a. a statement or block that is repeated as long as the expression is true
b. a statement or block that is repeated only if the expression is false
c. one line of code that is repeated once, if the expression is true
d. a statement or block that is repeated once, if the expression is true
a. a statement or block that is repeated as long as the expression is true
b. a statement or block that is repeated only if the expression is false
c. one line of code that is repeated once, if the expression is true
d. a statement or block that is repeated once, if the expression is true
Exericse Number
Chapter 04,
Quiz
Chapter 4 Quiz Starting Out With C++ 017
You can include multiple statements in the body of a while loop, if you enclose them in braces.
a. true
b. false
a. true
b. false
Exericse Number
Chapter 04,
Quiz
Chapter 4 Quiz Starting Out With C++ 016
The test condition of a for loop cannot include multiple relational expressions.
a. true
b. false
a. true
b. false
Subscribe to:
Posts (Atom)