due October 4, 2010 |

**Function Prototypes**Consider the following function, which adds two double precision floating point numbers:double sum(double x, double y) { return(x + y); }

For this assignment, create a file containing this function definition, and a second file with a program which calls the`sum`function using two**integer**arguments, and which prints the value returned by`sum`. Compile and run the program twice, first declaring sum asdouble sum();

and then using a function prototype, likedouble sum(double,double);

Does the value printed by the program when you use the first declaration agree with the value when you use the function prototype? Explain why or why not.-
**Determining Machine Constants**Write a program (or programs) to determine the following:**Largest Integer**What is the largest integer (both long and short) that can be handled in the computer? What happens when an integer becomes larger than this due to a computation?-
**Largest Unsigned Integer**What is the largest unsigned integer (both long and short) that can be handled in the computer? What happens when an unsigned integer becomes larger than this due to a computation? -
**Largest Floating Point Number**What is the largest floating point number (both single and double precision) which can be handled in the computer? What happens when a number becomes larger than this due to a computation? -
**Machine Epsilon**One important constant on the computer is the smallest number such that, when it is added to 1, the result is greater than 1. What is the value of machine epsilon?

*Note:*Most of the values described above can be found in a header file in the standard include directory`/usr/include`. If you can find the appropriate header file, it may be of interest to compare the results in that file with the results of your program. (Please note that finding the header file does not constitute completing the assignment.) -
**Probability Tables for the Chi-squared Distribution**Write a program that will prompt a user for degrees of freedom and probability level, and which will then print the critical chi-squared value. You will need to use a subroutine from a library such as`dcdflib`to calculate the critical value; look at`/app/dcdflib/doc/dcdflib.fdoc`for information on how to call these routines. You should have some provision in your program to allow the user to make multiple requests, and then terminate the program in a "graceful" way.*Note:*The dcdflib routines are written in FORTRAN and you'll write your main routine in C so you'll need to learn how to call FORTRAN routines from C. Type`help fortran_from_c`for more information.

File translated from T

On 18 Aug 2010, 14:36.