Lab 5: Prelab Questions

Written Questions

Question #1: A(n) ____________ is a value received by a function in its definition; a(n) ____________ is a passed into a function when it's called.

Question #2: The ____________ statement returns a value from a function.

Question #3: A library consists of what three files?

Question #4: The interface to a library is stored in a(n) ____________ file.

Question #5: The implementation of a library is stored in a(n) ____________ file.

Programming Exercises

Code #1: Write the prototype for a function named next that receives an int parameter named value and returns an int.

Code #2: Write the function stub for the function described in the previous question.

Code #3: Write the code for the body of the function in the previous question. This code should return value plus 1.

Code #4: Write the specification of the function next().

Code #5: Write an expression that calls next(), sending it the value of a variable named unitCount.

Lab Exercise
Report errors to Larry Nyhoff (