{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Chapter 13 IM Answers

Chapter 13 IM Answers - An Introduction to Programming with...

Info icon This 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; getline(inFile, textLine); } //end while 11. while(!inFile.eof()) 12. outFile.close(); EXERCISES – COMPUTER 1. See the Cpp5\Chap13\Ch13ConE01 Solution-IM files.
Image of page 1

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

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

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern