NAME (1pt): _________________________    SEC
(1pt):    1    2   
3    4    
1) (1pt) In order to interact with a file, what must be associated with it?
  - file handle
- file pointer    <== 
- data buffer
- I/O stream
2) (1pt) When opening a file, what two arguments must be supplied to  fopen()?
  - file name, access mode    <== 
- file name, file location
- access mode, file size
- file name, file size
3) (3pts) What are the three common file structures as far as controlling how
the program determines how much data to read from a file?
Counter (header) controlled, sentinel (trailer)
controlled, end-of-file (eof) controlled.
4) (1pt) While covered in the book, it is very important (some would argue
critical) that the success of every fopen() call be verified before any attempt
to access the file, for reading or writing, is made. How can this be done?
By checking fopen() for a NULL return value
5) (1pt) Of the following, which is the best description of linear
regression?
  - A means of finding the straight line that exactly matches all of the data
    in a data set.
- A means of determining the y-value corresponding to an x-value between two
    known data points.
- A means of finding the straight line that, overall, provides the best fit
    to a given data set.   <== 
- A means of generating a data file having a large number of linearly
    related data points.
6) (1pt) Which of the following is not an advantage and/or goal of using the
principle of modularity in your programs?
  - Execution speed can be greatly enhanced because any one module is only
    performing a fraction of the entire program.   <== 
- Code can be developed, tested, and debugged in small, easier to manage
    pieces.
- Code that performs common tasks can be reused easily either within a
    single program or across multiple programs.
- The "divide-and-conquer" approach to problem solving can be
    facilitated because various parts of a problem can be assigned to different
    people and developed in parallel.