|
I just finished grading the midterm. I'll hand it back tomorrow (Wednesday, 7 November) in class. It was quite good on the whole. Later this week, I'll post an audit of all the grades so far so you can see where you stand, and report any errors. I think that we covered most of the interesting issues in class. We did very well on the invariant problem. I think that everyone who made a mistake should figure out the correction. Nobody's program was completely mixed up. But I can't count: 12, 13As some fanatical protesters suggested in class, I miscounted the number of steps in the last problem. The way I did it, there were only 12, not 13. I think I must have counted the ``...'' as a step by accident. For those of you who were intimidated into thinking up a bogus step, I let it pass. For those of you---quite a few---who had the confidence to insist on 12, I gave 2 extra points. And the real count is 14I've used variations on this problem a number of times over the years, and Ozgur Sozen is the first to notice another error. Although I expressed the problem in terms of C, I actually solved it using the Pascal interpretation of arrays, in which the l-value of an array refers to the block of storage containing the array elements. In C, the l-value of an array variable is actually a slot for a pointer to the block of array elements. So, in C, we must dereference each array variable before we can find the l-value of an array reference. This should affect both of the array references in the assignment, leading to 14 steps. I am blushing with embarassment, while giving extra credit to those who caught my errors. Mike O'D. |
to: