CS360 Final -- December 11, 1999.
- There are four questions.
- You have 2 hours.
- Each question should take roughly the same amount of time.
- Do your answers on a separate sheet of paper.
- Question 2 and part of question 4 have answer sheets for you
to fill in.
So this was a difficult exam. Questions 1 and 2 were hard, and question
three took some thought. Question 4 was straightforward. This exam stressed
the ability to write understandable code under time pressure. I know that
some of you have more trouble with that and are better at writing code
when you have the chance to test it and use a debugger, but I believe that
one of the best ways to communicate that you are thinking along the
right lines is to be able to spew out code such as required in this exam.
While questions 1 and 2 caused the most trouble, they were basically
material from labs 6 and 7. I was especially surprised that all the
pointer gyrations of question 1 were handled for the most part poorly.
You did have to do roughly the same thing in lab 6. When I see the
quantity of gibberish that I saw for answers to questions 1 and 2, it makes
me wonder if you are actually doing the labs, or if you are getting your
lab answers by other means. This is one of the reasons that I write
As usual, I like to set levels for A's and B's based on the grading of
Ok, so that's 34 points for a B, and 47 for an A. I'll subtract 4 points
due to you being stressed out due to time pressure, and that gives the
following grade ranges:
- Question 1: I'd call a 7 the minimal competent grade, getting
1 point for pointer manipulation, 1 point for the checksum, two points
for checking the size, one point for decrementing the size.
and 2 points for hooking it into the list. All of you should know
how to make a program dump core, so should call this a 9 instead of a 7.
For an A, you should have at least an 11.
- Question 2: For the B level, I'd say 8 points: Calling
pipe once, fork() twice, dup2, execlp, exit, fdopen, and
having the child code be the same in both children. For an A,
I'd add getting most of the closes right and calling pipe the second time:
- Question 3: For the B level, 3 points for part 1, 2 for part 2,
3 for part 3 and 2 for part 4: 10 points. For an A you should have at least
- Question 4: For a B, I'd say 7 points for part 1
(2.5 points for the code in main, 6.5 points for service-thread (missing
free, *t->nchars, and another random half point), and perhaps a 2 point
deduction for your mutex.). Everyone should get two points for part 2.
That's 9 points. For an A, you should get everything but two points and
on part 1 (forgetting to free(t), and a random error),
and again 2 points on part 2. That's a 12.
- Above 50: A+ -- congratulate yourself on acing a difficult exam!
- 43 to 50: A
- 39 to 43: B+
- 30 to 39: B
- 25 to 30: C
- 20 to 25: D
- Below 20: F