Exam 5: Looping
Exam 1: Introduction to Computers and Programming40 Questions
Exam 2: Introduction to C Plus Plus40 Questions
Exam 3: Expressions and Interactivity40 Questions
Exam 4: Making Decisions40 Questions
Exam 5: Looping40 Questions
Exam 6: Functions40 Questions
Exam 7: Introduction to Classes and Objects40 Questions
Exam 8: Arrays40 Questions
Exam 9: Searching, Sorting, Algorithm Analysis40 Questions
Exam 10: Pointers62 Questions
Exam 11: More About Classes and Object-Oriented Programming70 Questions
Exam 12: More on C-Strings and the String Class40 Questions
Exam 13: Advanced File and Io Operations40 Questions
Exam 14: Recursion20 Questions
Exam 15: Polymorphism and Virtual Functions22 Questions
Exam 16: Exceptions, Templates, and the Standard Template Library Stl40 Questions
Exam 17: Linked Lists38 Questions
Exam 18: Stacks and Queues36 Questions
Exam 19: Binary Trees38 Questions
Select questions type
A(n) ________ is a variable that controls the number of times a loop iterates.
(Multiple Choice)
4.8/5
(27)
What will the following code print?
Num = 8;
Cout << --num << " ";
Cout << num++ << " ";
Cout << num;
(Multiple Choice)
4.7/5
(33)
What will the following code print?
Num = 5;
Cout << num++ << " ";
Cout << num-- << " ";
Cout << --num;
(Multiple Choice)
4.7/5
(38)
A while loop is somewhat limited because the counter can only be incremented or decremented by one each time through the loop.
(True/False)
4.9/5
(29)
The while loop has two important parts: a condition that is tested and a statement or block of statements that is executed
(Multiple Choice)
4.9/5
(32)
The ideal type of loop to use for repeating a menu is a(n) ________ loop.
(Multiple Choice)
5.0/5
(36)
A(n) ________ is a special value that marks the end of a list of values.
(Multiple Choice)
4.8/5
(31)
The ideal type of loop to use if you want a user to enter exactly 20 values is a(n) ________ loop.
(Multiple Choice)
4.7/5
(32)
If nothing within a while loop ever causes the condition to become false, a(n) ________ may occur.
(Multiple Choice)
5.0/5
(35)
A variable that keeps a running total of data values is called a(n)
(Multiple Choice)
4.9/5
(33)
The block of code in the body of a while statement can contain an unlimited number of statements, provided they are enclosed in a set of braces.
(True/False)
4.8/5
(42)
The while loop is a(n) ________ loop, whereas the do-while loop is a(n) ________ loop.
(Multiple Choice)
4.8/5
(43)
Showing 21 - 40 of 40
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)