Guidelines for exercise in programming language C. SJ 010299 General All exercises are of the form "write a function ... write also a program to test the function". Further, all exercises require dynamic memory allocation, array parameters, and freeing allocated memory. All these elements have to be included in every exercise. A complete exercise includes: a) documentation in printed form b) source code in printed form c) source code in file named work_number.c (e.g., CE1.c) either 1) text file in a floppy disk in MS-DOS format, or 2) email to juvaste@cs.joensuu.fi before the paper copies format: either uuencode or MIME encoding. The program has to be in ANSI-C (no C++, Visual, Borland, etc. extensions). The work will be compiled with gcc. Documentation The proper length of a document is 2-4 pages. The document includes: - front matter (name, student number, email address, exercise number) - user guide of the program - description of the problem - description of the solution - detailed description of the function calling parameters and return values (including restrictions and function behavior in case of erroneous parameters) - description of allocation, using, and freeing of dynamic variables - testing report Evaluation: Positive effect: - input error checking - detailed documentation - easy-to-read source code Negative effect: - cryptic code - bad programming style - incomplete solution