CS 2213 Advanced Programming, Spring 2001 Midterm Exam 2 Comments
Grade Distribution:
- 90-100: 6
- 80-89: 9
- 70-79: 10
- 60-69: 9
- 50-59: 13
- below 50: 11
- Class average: 64
General Comments
- Problem 3: A typedef does not allocate any memory.
- Problem 4: Most common mistake, confusing . and ->
- Problem 5:
- Remember to skip the name of the program.
- You lost 5 points if you did not correctly address the first
character of each command line argument.
- Problem 6:
- Make sure you check for EOF before outputting any character
- Make sure you output the newline.
- Only blanks (' ') are removed, not tabs.
- " " is not a character, it is a string.
- If your main loop is
while ( (c=getcahr()) != '\n' )
then your program will only process one line.
- Characters can be processed one at a time. You do not have to
assume a maximum line length.
- The input is not a string. Do not check for the string terminator.
- Problem 7:
- You may not use strcmp, unless you write it.
- You should write a string compare function rather than trying to
do the comparison in-line.
- If you use:
while(start -> next != NULL)
you will probably not check the last entry.
- Make sure you understand the difference between . and ->
You can find the solutions
here.