Exam 4: Performing Loops
Exam 1: An Overview of Object-Oriented Programming and C++55 Questions
Exam 2: Evaluating C Expressions51 Questions
Exam 3: Making Decisions50 Questions
Exam 4: Performing Loops51 Questions
Exam 5: Understanding Arrays, Strings and Pointers55 Questions
Exam 6: Using C++ Functions51 Questions
Exam 7: Using Classes56 Questions
Exam 8: Class Features and Design Issues53 Questions
Exam 9: Understanding Friends and Overloading Operators52 Questions
Exam 10: Understanding Inheritance53 Questions
Exam 11: Using Templates54 Questions
Exam 12: Handling Exceptions51 Questions
Exam 13: Advanced Input and Output55 Questions
Exam 14: Advanced Topics53 Questions
Select questions type
Write a program that projects sales goals for a salesperson for the next several years.The user should be prompted for a first year's merchandise sales amount and a number of years to project the goals. For the first year, the salesperson's goal is the current sales amount. After that, sales are projected to grow at a rate of 8 percent per year. You should use a do-while loop.
(Essay)
4.9/5
(35)
The most difficult aspect of working with ____ loops is keeping track of the separate loop control variables that direct the program's execution.
(Multiple Choice)
4.9/5
(37)
Most often the evaluate part of the for statement compares the loop control variable with a ____________________ or limit.
(Short Answer)
4.8/5
(40)
It is preferable to initialize loop control variables at the beginning of a program.
(True/False)
4.9/5
(24)
Match each term with the correct statement below.
Premises:
controls the execution of a loop body
Responses:
while loop
loop body
garbage value
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(32)
Match each term with the correct statement below.
Premises:
uninitialized variable
Responses:
while loop
do-while loop
sentinel value
Correct Answer:
Premises:
Responses:
(Matching)
4.8/5
(30)
The initialize portion of a for loop comes after the evaluate portion.
(True/False)
4.8/5
(38)
If a program runs for several seconds and appears to be doing nothing or produces repeated output, you should suspect an infinite loop.
(True/False)
4.8/5
(40)
Showing 41 - 51 of 51
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)