Some men just want to watch the world burn. Some of them are teacher assistants. And some of them give tests like
this to an intro class. Sure, it’s not very difficult (except for 1e, which requires deeper understanding of the language), but it’s really, really tricky.
Well, check for yourself.
It’s been a while since I posted anything, so… here I am, still alive, doing science, and a little busy. That said, just a few hours ago I stumbled upon two interesting C and C++ quizzes and, despite my own score being rather poor, I’d like to share. Without further ado, links:
I’ve stumbled upon some interesting C knowledge quizzes. They deal with subset of C that is almost completely compatible with C++ (except for headers), so they’re also valid for that language. There is no doubt that a major part of these questions is just bad programming, even if correct from the standard’s point of view, but I still felt good about myself after getting full scores without cheating.
I think I should mention that for the second link, it is wise to assume that sizeof(int) == 4