Write out your answers for these questions on a separate piece of paper.
Question #1: A library consists of what three files?
Question #2: The interface to a library is stored in a(n) ____________ file.
Question #3: The implementation of a library is stored in a(n) ____________ file.
Question #4: 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 #5: The ____________ statement returns a value from a function.
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 which calls next()
on a variable named
unitCount
.