CS360: Exam 1: 10/22/97. Grading of Question 3

I graded this as follows. You start with all the points and then had deductions for the following:
  1. Extraneous statements: 1 or 2 points, depending on how egregious they were.
  2. Passing j instead of the address of j in a(): 2 points.
  3. Saying return b(j+i) in a(): 1 points.
  4. Saying i = i+3 in main(): 1 points. (There would be an extra st %r0 -> [fp] plus some other stuff in the assembler).
  5. No return statement in main(): 1 point.
  6. Passing two arguments to a(): 2 points.
  7. Arguments to c() reversed: 2 points.
  8. *j instead of the address of j.
  9. Saying j = j+5 in main() -- see #4 above for why that's a problem: 1 point.
  10. Splitting the return b(j)+i; into multiple statements: 1 point.
  11. No return statement in a(): 1 point.

Histogram of scores