A: 4 points. This should have been a free 4 points for everyone.
If you printed the lines out forwards, you got 1 point. If you
reversed the lines instead of the words, you got 2 points.
B: 4 points.
Were there actually a strdup(), it would print out the lines backward.
If you printed the lines backward, you got two points. If you printed out
the lines forward, you got one point.
I understand that you may not be familiar with gets(), but I did
describe it during the test.
C: 4 points. Were there no bus error, the following would
have been printed out:
4 bytes containing the number 3
The string "JIM"
4 bytes containing the number 5
The string "PLANK"
If you said the above, you got 3 points. If you said "3JIM5PLANK" you got
2 points.