Chapter 13 IM Answers

Chapter 13 IM - An Introduction to Programming with C Fifth Edition-3618-4 Chapter 13 Answers CONCEPT LESSON REVIEW QUESTIONS 1 a field 2 c record

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
An Introduction to Programming with C++: Fifth Edition 978-1-4188-3618-4 Chapter 13 Answers CONCEPT LESSON REVIEW QUESTIONS 1. a field 2. c record 3. b fstream 4. c ofstream 5. b ofstream outPayroll; 6. d both a and b 7. c ios::app 8. a close() 9. a is_open() 10. c outFile << city << endl; 11. d none of the above 12. d outFile << city << ‘#’ << state << endl; 13. c while (!inFile.eof()) 14. b ifstream inPayroll; 15. d both b and c EXERCISES – PENCIL AND PAPER 1. ifstream inSales; 2. inSales.open(“jansales.txt”); [or inSales.open(“jansales.txt”, ios::in); ] 3. outSales.open(“firstQtr.txt”, ios::app); 4. outSales.open(“febsales.txt”); [or outSales.open(“febsales.txt”, ios::out; ] 5. if(outSales.is_open()) [or if(outSales.is_open() == true) ] 6. outFile << “Employee << endl; outFile << “Name” << endl; 7. outFile << capital << endl; 8. getline(inFile, textLine); 9. inFile >> number; 10. getline(inFile, textLine); while(!inFile.eof()) { cout << textLine << endl;
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 03/11/2010 for the course CS 343 taught by Professor Katzman during the Spring '09 term at ITT Tech Tucson.

Page1 / 3

Chapter 13 IM - An Introduction to Programming with C Fifth Edition-3618-4 Chapter 13 Answers CONCEPT LESSON REVIEW QUESTIONS 1 a field 2 c record

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online