Exam 5: Loops and Files
Exam 1: Introduction to Computers and Programming50 Questions
Exam 2: Introduction to C Plus Plus60 Questions
Exam 3: Expressions and Interactivity44 Questions
Exam 4: Making Decisions53 Questions
Exam 5: Loops and Files63 Questions
Exam 6: Functions49 Questions
Exam 7: Arrays58 Questions
Exam 8: Searching and Sorting Arrays20 Questions
Exam 9: Pointers45 Questions
Exam 10: Characters, C-Strings, and More About the String Class45 Questions
Exam 11: Structured Data53 Questions
Exam 12: Advanced File Operations38 Questions
Exam 13: Introduction to Classes47 Questions
Exam 14: More About Classes40 Questions
Exam 15: Inheritance, Polymorphism, and Virtual Functions40 Questions
Exam 16: Exceptions, Templates, and the Standard Template Library Stl39 Questions
Exam 17: Linked Lists40 Questions
Exam 18: Stacks and Queues47 Questions
Exam 19: Recursion22 Questions
Exam 20: Binary Trees38 Questions
Select questions type
An initialization expression may be omitted from the for loop if no initialization is required.
(True/False)
4.8/5
(78)
The do-while loop is a(n)________ loop that is ideal in situations where you always want the loop to iterate at least once.
(Multiple Choice)
4.8/5
(96)
If you want a user to enter exactly 20 values, which loop would be the best to use?
(Multiple Choice)
4.9/5
(90)
In C++ 11 you can pass a string object as argument to a file stream object's open member function.
(True/False)
4.9/5
(91)
The statements in the body of a while loop may never be executed, whereas the statements in the body of a do-while loop will be executed:
(Multiple Choice)
5.0/5
(71)
This is a special value that marks the end of a list of values.
(Multiple Choice)
4.9/5
(83)
Something within a while loop must eventually cause the condition to become false, or a(n)________ results.
(Multiple Choice)
5.0/5
(77)
This is a control structure that causes a statement or group of statements to repeat.
(Multiple Choice)
4.9/5
(75)
This is a variable that is regularly incremented or decremented each time a loop iterates.
(Multiple Choice)
4.9/5
(82)
The while loop contains an expression that is tested for a true or false value, and a statement or block that is repeated as long as the expression:
(Multiple Choice)
4.9/5
(75)
This statement may be used to stop a loop's current iteration and begin the next one.
(Multiple Choice)
4.8/5
(82)
You may nest while and do-while loops, but you may not nest for loops.
(True/False)
4.8/5
(67)
It is possible to define a file stream object and open a file in one statement.
(True/False)
4.9/5
(90)
The scope of a variable declared in a for loop's initialization expression always extends beyond the body of the loop.
(True/False)
4.9/5
(76)
When the increment operator precedes its operand, as in ++num1, the expression is in this mode.
(Multiple Choice)
4.9/5
(95)
Showing 41 - 60 of 63
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)