NOTE: Some of these questions ask you to think beyond the strict information given in the text.
(p128) In order to interact with a file, what must be associated with it?
(p128) When opening a file, what two arguments must be supplied to fopen()?
(p129) What is the only significant difference between printf() and fprintf()?
(p129) What is the only significant difference between scanf() and fscanf()?
(p130) What are the three common file structures as far as controlling how the program determines how much data to read from a file?
(p130) How can the fscanf() statement be used to detect when the end of a file has been reached?
(p137) What is one concern that must be considered when selecting a sentinel value?
(n/a) 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?
(p140) Of the following, which is the best description of linear regression?
(p162) Which of the following is not an advantage and/or goal of using the principle of modularity in your programs?
(p165) Given the following function definition:
double
sinc(double x)
{
if (fabs(x) < 0.01)
return( 1.0 - ( (x*x)/6.0) );
else
return( sin(x) / x );
}
Draw a flowchart for the this function.
(p165) Write a complete function called log_b() that takes two arguments, both of type double, and returns a value of type double. The return value should be the logarithm of the first argument taken to the base of the second argument. Be sure to indicate any standard library files that must be included in order for this function to run.