EG H167          1:30 Sec.          Winter 2001          Daily Assignment D6Advanced


For the D6 Advanced assignment:


1.          Complete the regular D6 assignment which introduces some simple C language file input and output.


2.          Complete the following:


a). Enhance your D6 program to prompt the user for a file name and display the contents file on the screen.  You might want to consider reading the file line by line, rather than with a "format".


b). What happens if you type in the name of a file which does not exist?






c). Modify your program to handle this situation gracefully.  (Hint:  What does fopen return when a file can not be opened?)