CS 3050, Spring 2007
Homework 1
Due Friday, February 23rd,  in class

Problems from pages 40 and 41 in the book:

2. For the C++ language:
a. Make a list of the different ways to preform the file operations Create, Open, Close, Read, and Write. Why is there more than one way to do each operation?
b. How would you use fseek to find the current position in a file?

3. A couple of years ago a company we know bought a new Cobol compiler. One difference between the new compiler and the old one was that the new complier did not automatically close files when execution of a program terminated, whereas the old compiler did. What sorts of problems did this cause when some of the old software was executed after having been recompiled with the new compiler?

6. Look up the Unix command wc. Execute the following in a Unix environment, and explain whey it gives the number of files in a directory.
ls | wc -w