This is a list of some practice questions and problems for this week's quiz. I encourage you to first, read the sections, and then try review problems in the book. When that is complete, you should try these problems and understand their solutions. This set of quiz questions is not a complete list (and some of the questions are half-formed, so there is no guarantee that any of these will appear on the quizzes). This quiz covers chapter 12 sections. ------------------------------------------------------------------ Short Answer Questions ------------------------------------------------------------------ 1. Explain the difference between fstream and iostream. 2. What is an ifstream? 3. What is an ofstream? 4. How is ifstream different from istream? 5. How is ofstream different from ostream? 6. Can overloaded output and input be used on ofstream and ifstream objects respectively? (The answer here is yes. They can be used on the 'fstream' objects because of a neat class concept called class hierarchies.) 7. What #include directive is necessary for file input and output? 8. Explain why 9. Demonstrate how to open a file called ... for input. 9. Demonstrate how to open a file called ... for output. 10. Name four functions used with ifstream objects and describe what they do. (To answer this question, you must think of these four functions: fail, open, close, >>) 11. Name three functions used with ofstream objects and describe what they do. (To answer this question, you must think of these three functions: open, close and <) 12. Why is file input and output important? 13. Name a real world circumstance where file input and output is used in a program. 14. Demonstrate code to read in a file structured like: . . . 15. Demonstrate code to output to a file structured like: . . .