Answers to In-class Exercises in Lectures 9, 10, 11



Answers to In-class Exercises in Lectures 9, 10, 11

Lecture 9 Exercises

The only exercises we did in Lecture 9 involved library functions. The answers are provided here for your information but there will not be any questions on the quiz that require knowledge of library functions.

1 Exercise 1

Replace bold lines in following program with the abort library function.

#include // provides ifstream, ofstream

#include // provides cout

using namespace std;

int main()

{

ifstream infile;

infile.open("yards.in");

if (!infile) {

cout ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download