CSC 213, Fall 2006 :
Laboratory exercises
[ skip links
| submitting
programs | notes
on grading ]
Laboratory Exercises
This course includes weekly laboratory exercises, as listed on
the course schedule.
For more information about how to prepare for and complete lab
exercises, see the discussion
under Course Mechanics.
Submitting Programs For This Course
In turning in any programs for the course, please follow these
directions:
- The first seven or more lines of any C program should be comments
containing
your name, your mailbox number, your lab section, an identification
of assignment being solved, and a description of the contents of the file. For example:
/*************************************************************************
* Janet Davis
* Box Science II
* Laboratory Section 213L.04
* Lab 1: Review of C; Sorting and Order Statistics
* arraylib.c: Definitions of useful functions to manipulate arrays
************************************************************************/
- Also, a comment is needed for every definition of a C
function, stating in
English what that program unit is supposed to do.
- Obtain a listing of your program and a record of relevant
test runs using the script command:
- Within a terminal window (before
running C), begin
recording session with the statement
script filename
where filename is the name of the file in which you
want the session
stored.
- Within the script file,
- Print a copy of your program with the command
cat C-file.c
where C-file.c is the name of
the file containing
your C program.
- If your work involves several files, list the main
program first with the cat command; then list any
supplementary
files.
- Compile your program with the gcc
command, and run it with
appropriate test cases to check the correctness of your program.
- When your runs are complete, stop the script
session by typing
<Ctrl/D>.
- Print the record of your session by typing
enscript
filename
- Either write on your printout or include a separate
statement that argues
why your program is correct, based upon the evidence from your test
runs.
Notes
on Grading
Janet
Davis (davisjan@cs.grinnell.edu)
Created August 21, 2006 based on http://www.cs.grinnell.edu/~walker/courses/213.fa04/assignments.shtml
Last revised August 27, 2006
With thanks to Henry Walker