Some questions on reference parameters

This is the fourth programming milestone

  1. Modify the function you wrote in exercises on statics so that it returns both the mean and the number of observations, via suitable reference parameters. Test this carefully.

  2. Now rewrite the function to use a struct, passed in by reference, to return the sum, mean and number of observations. This allows the same function to keep records for multiple streams of numbers. Again test it carefully, for two or more separate streams.

Hints on these questions.


Back to notes on reference parameters.