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
Assuming outFile is a file stream object and number is a variable, which statement writes the contents of number to the file associated with outFile?
Free
(Multiple Choice)
4.9/5
(34)
Correct Answer:
C
How many times will the following loop display "Hello"?


Free
(Multiple Choice)
4.8/5
(42)
Correct Answer:
B
A loop that is inside another loop is called:
Free
(Multiple Choice)
4.9/5
(40)
Correct Answer:
D
Multiple relational expressions cannot be placed into the test condition of a for loop.
(True/False)
4.7/5
(40)
Look at the following statement. while
Which operator is used first?

(Multiple Choice)
4.7/5
(39)
A file must be ________ before data can be written to or read from it.
(Multiple Choice)
4.8/5
(31)
This loop is a good choice when you know how many times you want the loop to iterate in advance of entering the loop.
(Multiple Choice)
4.9/5
(32)
A file ________ is a small holding section of memory that file-bound information is first written to.
(Multiple Choice)
4.9/5
(38)
You may not use the break and continue statements within the same set of nested loops.
(True/False)
4.8/5
(40)
You may define a ________ in the initialization expression of a for loop.
(Multiple Choice)
4.8/5
(25)
The increment and decrement operators can be used in mathematical expressions; however, they cannot be used in relational expressions.
(True/False)
4.8/5
(34)
If you want to stop a loop before it goes through all its iterations, the break statement may be used.
(True/False)
4.8/5
(40)
A for statement contains three expressions: initialization, test, and
(Multiple Choice)
4.8/5
(40)
This operator increments the value of its operand, then uses the value in context.
(Multiple Choice)
4.8/5
(30)
Showing 1 - 20 of 63
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)