CS 111 - Programming Practicum

Lab 11- Due Monday, 11/19/12

For ths lab you are to write a C program that will perform the following operations on a linked list.

  • insert
  • delete
  • contains
  • empty
  • list items
  • print items in the list in reverse order
The linked list is to contain one integer vaue per node.

The input for the operations will be as follows:

q - quit the program

i <int> - insert the integer value into the linked list. The items in the list are to be stored in increasing order with the smallest values toward the front of the list.

d <int> - delete the integer value from the linked list. Be sure to properly deallocate the nodes in the linked list.

c <int> - display a message stating whether the given integer value is contained in the linked list.

e - empty all values from the linked list. Be sure to properly deallocate the nodes in the linked list.

l - list the items contained in the linked list.

r - list the items contained in the linked list in reverse order.


Each of the above operations can be done using a recursive algorithm. You are required to write at least two of the above operations using recursive code.

Program Submission

Your are to submit the programs for this lab via the Assignments Page in Blackboard.

To help the TA, name your file with your net-id and the assignment name, like:

  • ptroy1LabX.c

Submit this file via the Assignment Link for the Lab in Blackboard.

  1. In the CS 211 Web Pages in Blackboard, go to the Assignments Page
  2. Click on the link for the correct lab. This will open a web page with the title: "Upload Assignment: Lab X", where X is the number of the lab
  3. Scroll down and click on the button "Browse for Local File"
  4. Select the file that you created that contains the program. Then click OK.
  5. Repeat steps 3 and 4 for your second program.
  6. Click the submit button on the "Upload Assignment: Lab X" page.
  7. You should see the Submission History page that shows what you submitted. Verify you actually submitted the correct information.

-- Main.troy - 2012-11-14

This topic: CS211 > AssignmentsF12 > CS211Lab11F12
Topic revision: r1 - 2012-11-14 - 04:12:01 - Main.troy
Copyright 2016 The Board of Trustees
of the University of Illinois.webmaster@cs.uic.edu
Helping Women Faculty Advance
Funded by NSF