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
The update expression of a for loop can contain more than one statement, e.g. counter++, total+= sales.
(True/False)
4.8/5
(31)
The while loop has two important parts: an expression that is tested for a true or false value, and:
(Multiple Choice)
4.8/5
(38)
string objects have a member function named c_str that returns the contents of the object formatted as a null-terminated C-string.
(True/False)
4.8/5
(41)
The condition that is tested by a while loop must be enclosed in parentheses and terminated with a semicolon.
(True/False)
4.8/5
(27)
This statement may be used to stop a loop's current iteration and begin the next one.
(Multiple Choice)
4.8/5
(30)
Assuming dataFile is a file stream object, the statement: dataFile.close();
(Multiple Choice)
4.7/5
(29)
If you place a semicolon after the test expression in a while loop, it is assumed to be a(n):
(Multiple Choice)
5.0/5
(41)
A while loop is somewhat limited, because the counter can only be incremented by one each time through the loop.
(True/False)
4.8/5
(42)
To allow file access in a program, you must #include this header file.
(Multiple Choice)
4.9/5
(42)
To write data to a file, you define an object of this data type.
(Multiple Choice)
4.8/5
(33)
This is a pre-test loop that is ideal in situations where you do not want the loop to iterate if the condition is false from the beginning.
(Multiple Choice)
4.8/5
(30)
These are operators that add and subtract one from their operands.
(Multiple Choice)
4.9/5
(36)
A while loop's body can contain multiple statements, as long as they are enclosed in braces.
(True/False)
4.7/5
(33)
Showing 21 - 40 of 63
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)