MIS 505 Final Exam Review Chapter 5: Looping | Chapter 5: Looping, Answered, latest Spring 2020.
10 views 0 purchase
Course
COM 204 (COM204)
Institution
Rasmussen College
MIS 505 Final Exam Review 6 Chapter 5: Looping The loop control variable is initialized after entering the loop. In some cases, a loop control variable does not have to … initialized. An indefinite loop is a loop that never stops. You can either increment or decrement the loop control variable. W...
mis 505 final exam review chapter 5 looping | chapter 5 looping
latest spring 2020
Written for
Rasmussen College
COM 204 (COM204)
All documents for this subject (1)
Seller
Follow
perfectgrade
Reviews received
Content preview
Chapter 5: Looping
TRUE/FALSE
1. The loop control variable is initialized after entering the loop.
ANS: F PTS: 1 REF: 171
2. In some cases, a loop control variable does not have to be initialized.
ANS: F PTS: 1 REF: 171
3. An indefinite loop is a loop that never stops.
ANS: F PTS: 1 REF: 173
4. You can either increment or decrement the loop control variable.
ANS: T PTS: 1 REF: 173
5. When one loop appears inside another is is called an indented loop.
ANS: F PTS: 1 REF: 177
6. Forgetting to initialize and alter the loop control variable is a common mistake that programmers
sometimes make.
ANS: T PTS: 1 REF: 183
7. Every high-level computer programming language contains a while statement.
ANS: T PTS: 1 REF: 192
8. Both the while loop and the for loop are examples of pretest loops.
ANS: T PTS: 1 REF: 193
9. The safest action is to assign the value 1 to accumulators before using them.
ANS: F PTS: 1 REF: 197
10. It is the programmer’s responsibility to initialize all variables that must start with a specific value.
ANS: T PTS: 1 REF: 198
MULTIPLE CHOICE
1. The first step in a while loop is typically to ____.
a. compare the loop control variable to a constant value
b. initialize the loop control variable
c. increment the loop control variable
d. execute the body of the loop
, ANS: B PTS: 1 REF: 171
2. Once your logic enters the body of a structured loop, ____.
a. the entire loop must execute
b. the loop can be terminated with a break statement
c. the loop will execute indefinitely
d. a decision statement will be evaluated
ANS: A PTS: 1 REF: 171-172
3. The last step in a while loop is usually to ____.
a. compare the loop control variable to a constant value
b. initialize the loop control variable
c. increment the loop control variable
d. execute the body of the loop
ANS: C PTS: 1 REF: 172
4. A(n) ____ loop executes a predetermined number of times.
a. terminal c. indefinite
b. definite d. infinite
ANS: B PTS: 1 REF: 172
5. Many loop control variable values are altered by ____, or adding to them.
a. incrementing c. accumulating
b. decrementing d. deprecating
ANS: A PTS: 1 REF: 173
6. A(n) ____ is any numeric variable you use to count the number of times an event has occurred.
a. accumulator c. index
b. key d. counter
ANS: D PTS: 1 REF: 173
7. A loop within another loop is known as a(n) ____ loop.
a. indefinite c. nested
b. infinite d. hidden
ANS: C PTS: 1 REF: 177
8. When one loop appears inside another, the loop that contains the other loop is called the ____ loop.
a. indefinite c. inner
b. definite d. outer
ANS: D PTS: 1 REF: 177
9. Usually, when you create nested loops, each loop has its own ____.
a. sentinel value c. entrance condition
b. goto statement d. loop control variable
ANS: D PTS: 1 REF: 177
10. A mistake programmers often make with loops is that they ____.
a. initialize the loop control variable prior to entering the loop body
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller perfectgrade. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $13.49. You're not tied to anything after your purchase.