Exam 5: Control Structures II Repetition
Exam 1: An Overview of Computers and Programming Languages40 Questions
Exam 2: Basic Elements of C++50 Questions
Exam 3: Inputoutput40 Questions
Exam 4: Control Structures I Selection40 Questions
Exam 5: Control Structures II Repetition40 Questions
Exam 6: User-Defined Function41 Questions
Exam 7: Namespaces, the Class String, and User-Defined Simple Data Types40 Questions
Exam 8: Arrays40 Questions
Exam 9: Records Structs40 Questions
Exam 10: Classes and Data Abstraction43 Questions
Exam 11: Inheritance and Composition41 Questions
Exam 12: Pointers, Classes, Virtual Functions, and Abstract Classes43 Questions
Exam 13: Overloading and Templates41 Questions
Exam 14: Exception Handling42 Questions
Exam 15: Recursion41 Questions
Exam 16: Searching and Sorting46 Questions
Exam 17: Linked Lists41 Questions
Exam 18: Stacks and Queues42 Questions
Select questions type
The ____________________ statement is typically used for two purposes:
• To exit early from a loop.
• To skip the remainder of a switch structure.
(Short Answer)
4.8/5
(31)
Suppose j, sum, and num are int variables, and the input is 26 34 61 4 -1. What is the output of the code? 

(Multiple Choice)
4.7/5
(35)
In a sentinel-controlled while loop, the body of the loop continues to execute until the EOF symbol is read.
(True/False)
4.9/5
(38)
Which of the following loops does not have an entry condition?
(Multiple Choice)
4.9/5
(39)
Consider the following code. (Assume that all variables are properly declared.) This code is an example of a(n) ____ while loop.


(Multiple Choice)
5.0/5
(39)
Assume all variables are properly declared. The output of the following C++ code is 2 3 4 5.


(True/False)
4.8/5
(28)
To generate a random number, you can use the function rand of the header file ____________________.
(Short Answer)
4.8/5
(38)
The number of iterations of a counter-controlled loop is known in advance.
(True/False)
4.7/5
(43)
A loop ____________________ is a set of statements that remains true each time the loop body is executed.
(Short Answer)
4.9/5
(35)
What executes immediately after a continue statement in a while and do-while loop?
(Multiple Choice)
4.8/5
(30)
What is the value of x after the following statements execute? 

(Multiple Choice)
4.8/5
(33)
The function eof is a member of the data type ____________________.
(Short Answer)
4.7/5
(43)
What is the next Fibonacci number in the following sequence? 1, 1, 2, 3, 5, 8, 13, 21, ...
(Multiple Choice)
5.0/5
(31)
The statement in the body of a while loop acts as a decision maker.
(True/False)
4.9/5
(42)
The control variable in a flag-controlled while loop is a bool variable.
(True/False)
4.9/5
(34)
Which of the following loops is guaranteed to execute at least once?
(Multiple Choice)
4.9/5
(27)
Showing 21 - 40 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)