Are the functions mentioned on the assignment sheet available ?
Yes. You can save them directly from the assignment using Netscape and "SaveAs" and then copy the bits you want. As well, the time utilities are available in the file "timutils.c" which you can download by clicking on it and then saving using "SaveAs".
Does the output produced by our programs have
to exactly match the output shown in the handout?
Not precisely, but within a space or so, yes.
Unfortunately the assignment was not specific about this. It is probably good form to have it loop until some finishing condition, such as a ctrl-d. However, since the assignment is not specific you would not lose marks as a result. Such things, however may fall into the bonus category.
October 11 : Assign 3 was updated for a typo - the reference to 5 provided functions was slightly messed up in that the last two were not displayed properly - this has been corrected. PLEASE NOTE - style, including comments will account for between 20 and 30 % of your grade on subsequent programming assignments. You may look at the style comments on this page for some simple guidelines.
Hey ... Don't cheat - the penalties won't be worth it, plus you'll fail the class too.
When we test your functions we will compile in the functions. Therefore you
may place the given functions separately.
For the error check bonus of part B, what do you mean by clever?
We asked for a clever idea/method meaning to produce a more time
efficient, smaller code or ingenious way of coding the given functions "helper"
functions, for example, perhaps encoding a function that could encorporate
error checking as well as the function that it should perform... or maybe
create a single function that could perform more than one function (that it
was originally designed for).. I don't want to make this answer too detailed
because that is also part of the cleverness... the student should try to think
of a method without one being "handed" to him/her I hope this helps...
An error can be an out of range number or nonsensical input (ie chars when
ints expected). A perfect program would always recognize junk. Do the
best you can. It is better to handle some errors than none.
Yes in fact for part 1B you will have to do this, for part 1A you dont.
The bonus comment was a bit of a mistake.
Another type in the assignment online. Use numbers1.c and numbers2.c.