The indirection syntax should be rewritten to be left to right. As it is, it’s a good fit for C’s idiosyncratic type syntax, but needlessly obtuse otherwise.
In the box whose number is in box 6, write the sum of the number that’s in the box whose number is in box 4, and the number that’s in box 5.
Take the number in box 5. Where n is the number in box 4, take the number in box n, and the number in box 5, and add them. Where m is the number in box 6, write the result in box m.
The indirection syntax should be rewritten to be left to right.
I don’t actually think so. The final answer is simply f(g(h(x))), which is a perfectly normal thing to see in programming.
That said, I still think it’s a bad test. It involves no reasoning whatsoever—merely following instructions carefully. I’m a reasonably good programmer, but sometimes a bit sloppy (that’s why I write tests). So, I ended up with the correct final answer but a wrong number in one of the boxes.
The indirection syntax should be rewritten to be left to right. As it is, it’s a good fit for C’s idiosyncratic type syntax, but needlessly obtuse otherwise.
I don’t actually think so. The final answer is simply f(g(h(x))), which is a perfectly normal thing to see in programming.
That said, I still think it’s a bad test. It involves no reasoning whatsoever—merely following instructions carefully. I’m a reasonably good programmer, but sometimes a bit sloppy (that’s why I write tests). So, I ended up with the correct final answer but a wrong number in one of the boxes.