CSC 201 Grinnell College Spring, 2005
Data Representation, Memory Management, and Formal Methods

Assignments for Computer Science 201

The following table indicates assignments and due dates for Computer Science 201. Unless otherwise indicated, textbook references are to course textbooks. Additional exercises are stated later on this page. Rules for submitting programs are given at the bottom of this page.

Collaboration is allowed on some assignments and not on others; specific rules of collaboration are shown for each assignment.

Due Date Text Chapter Collaboration Problems
Fri., Jan 28 Gries1 No 1.3, 1.4
Tues, Feb 1 C Prog.No Lab 1: Elementary C Programming
Fri, Feb 4 Gries2 No 2.5, 2.6cefghjkl
Tues, Feb 8 C Prog.Yes Lab 2: Representation of Integers
Fri, Feb 11 Gries4 No 4.1.3, 4.2.6a-bjkm, 4.4.2, 4.5.2ac
Gries5 No 5.1.1ace, 5.1.2bfg, 5.2.2, 5.2.3
Tues, Feb 15 C Prog.Yes Lab 3: Floating Point Numbers
Fri, Feb 18 Gries6 No 6.2.1deg
Tues, Feb 22 C Prog.Yes Lab 4: Functions and Parameter Passage
Mon, Feb 28 Gries7 No 7.1acef, 7.2(1,3,5), 7.4, 7.5
Gries8 No 8.1, 8.3, 8.6
Fri, Mar 4 Gries9 No 9.1.1ace, 9.2.2, 9.2.3bdf, 9.2.4ace, 9.3.1ace
Mon, Mar 7 C Prog.No Lab 5: Singly-Linked Lists
Wed, Mar 9 C Prog.No Lab 6: More Singly-Linked Lists
Fri, Mar 11 Gries10 No 10.1, 10.3, 10.5, 10.6, 10.8
Wed, Mar 16 C Prog.No Lab 7: Still More Linked Lists
Fri, Mar 18 Gries11 No 11.1, 11.8, 11.9, 11.10, 11.12
Tues, Apr 5 C Prog.No Lab 8: Queues as Circular Lists
Fri, Apr 8 Gries14 No 14.1abd
Tues, Apr 12 C Prog.No Optional Extra Credit Problems 1, 2, 3
Tues, Apr 12 C Prog.Yes Lab 9: Strings in C, Parts A-C
Tues, Apr 19 C Prog.Yes Lab 9: Strings in C, Part D
Fri, Apr 22 Gries15 No 15.1.3, 15.1.4, 15.2.2
Mon, Apr 25 C Prog.Yes Lab 10: Binary Search Trees
Wed, Apr 27 C Prog.No Lab 11: More Binary Search Trees
Fri, Apr 29 Gries16 No 16.2.2, 16.2.3
Gries16 No 16.3.1, 16.3.5, 16.3.7
Wed, May 4 C Prog.Yes Lab 12: Files in C
Fri, May 6 Gries16 No 16.5.2, 16.5.5, 16.5.9
Mon, May 9 C Prog.Yes Lab 13: make and makefile
Fri, May 13 C Prog.Yes Lab 15: Environmental Variables
Due Date Text Chapter Collaboration Problems

Additional Exercises

Assignment details for this course are forthcoming

Extra Credit Problems

The following exercises are optional. If turned in by the deadline given, they may earn extra credit points to be applied to the lab grade.

Extra Credit Problem 1: Due Tuesday, April 12

Modify ~walker/c/lists/namelist.c, by adding an option that will delete duplicate names on a singly-linked list. When duplicate names appear, the first entry on the list should be retained, and all subsequent duplicate entries deleted.

This problem should use an iterative solution, with no more than 3 temporary pointers (including function parameters).

Extra Credit Problem 2: Due Tuesday, April 12

Modify your doubly-linked-list program to include an option to sort the names on the list into ascending alphabetical order.

Your sorting procedure should use an insertion sort that moves nodes. The sorting procedure may not deallocate space or allocate space for nodes, and names may not be copied from one node to another (even through an intermediate character array).

Extra Credit Problem 3: Due Tuesday, April 12

Modify your doubly-linked-list program to delete duplicates from the list, assuming the list is ordered.

This problem should use an iterative solution, with no more than 3 temporary pointers (including function parameters).

This procedure should use a hush-and-kernel approach, in which the kernel is recursive. Other than parameters, the hush may have no local variables, and the kernel may have at most one local variable.

Submitting Programs For This Course: In turning in any programs for the course, please follow these directions:

  1. The first six lines of any C program should be comments containing your name, your mailbox number, this course number (195), and an identification of assignment being solved. For example:
         * Henry M. Walker                    *
         * Box Science II                     *
         * Program for CSC 201               *
         * Assignment for Friday, September 1 *
    Also, a comment is needed for every definition of a C function, stating both pre- and post-conditions for that program unit.

  2. Obtain a listing of your program and a record of relevant test runs using the script command:

  3. 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.
Some Grading Notes:

This document is available on the World Wide Web as

created 26 August 2001
last revised 4 May, 2005
Valid HTML 4.01! Valid CSS!
For more information, please contact Henry M. Walker at