CS 2213 Advanced Programming, Fall 2000 Exam 3 Comments
The solutions were handed out in class.
Grade Distribution:
| Range | Number |
| 100's | 1 |
| 90's | 4 |
| 80's | 8 |
| 70's | 9 |
| 60's | 9 |
| 50's | 9 |
| below 50 | 9 |
- Problem 2
a) and d) do not define any storage and so 0 bytes are allocated.
These were worth 2 points each. The others were 4 points each.
- Problem 4
- You should check both that argc is 2 and that the string passed has
length 1.
- Don't forget to check for EOF when doing each of the line loops.
- The string terminator is not a special character in this problem.
- You may not assume a maximum line length in this problem.
- You must handle the characters as they come in.
- Problem 5
- 5a) 6 points
- You must use strcmp or something similar to comapre the strings.
- 5c) 13 points
- the picture is worth 3 points
- you must free the node (3 points)
- you must reset *listpp (3 points)
- 5d) 17 points
- The case of an initially empty list must be treated as a special case
(4 points).
- You must do a malloc for the new node (4 points).
- You must find the end of the list correctly (4 points).