The _____ is pretest loop and the _____ is a posttest loop
a. do-while loop, while loop
b. while loop, do-while loop
c. repeat loop, while loop
d. while loop, repeat loop
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 5 Quiz Starting Out With C++ 010
The while loop is usually used when you know the exact number of times a loop will repeat
a. true
b. false
a. true
b. false
Exericse Number
Chapter 05,
Quiz
Chapter 5 Quiz Starting Out With C++ 009
What is the format of the while loop in C++?
a.
while ( x >5)
do {
y++;
}
b.
perform
{
y++;
} while (x >5)
c.
while (x >5)
{
y++;
}
a.
while ( x >5)
do {
y++;
}
b.
perform
{
y++;
} while (x >5)
c.
while (x >5)
{
y++;
}
Chapter 5 Quiz Starting Out With C++ 008
A _____ is a part of a program that repeats
a. function
b. loop
c. repeat
d. branch statement
a. function
b. loop
c. repeat
d. branch statement
Chapter 5 Quiz Starting Out With C++ 007
Can you use increment or decrement in relationship expressions?
if (x++ > 10)
cout << "Thanks for playing!";
a. true
b. false
if (x++ > 10)
cout << "Thanks for playing!";
a. true
b. false
Exericse Number
Chapter 05,
Quiz
Chapter 5 Quiz Starting Out With C++ 006
Given that x is 5 and y is 4 what will this code segment produce
z = ++(x + y);
a. 11
b. 10
c. a syntax error
d. a compilation error
z = ++(x + y);
a. 11
b. 10
c. a syntax error
d. a compilation error
Subscribe to:
Posts (Atom)