It was "an intro to programming course for incoming engineering freshman".
Also I write C++ for living and I was not entirely sure if "y = x++3;" was valid or not (turns out it is an error but "y = x+ +3;" is fine, which I would have guessed but would not have been quite certain).
Edit: Now that I think about, I believe that "x = (x++ == 3 + x % (x=x=3));" is undefined behavior. I guess the question is not asking about that but regardless, that's a stupid thing to ask.
If you set aside the fact that the deeper issue is probably that C++ in general is a bad intro language to begin with, then its not completely unreasonable to test on this syntactic stuff, especially as you go farther back when compilers/checkers were less friendly. For better or worse, one of the lessons of programming is the unforgiving nature of the computer to do exactly what you typed in, and not what you meant. I remember having a similar test or quiz to this when I was in high school (~12 years ago or so). Its not that big of a deal, the whole class is not just that, its just to kind of drill this into your head. We were using pretty terrible Borland compilers with rubbish error messages. At that particular point, being able to stare at code and determine what minor thing you mistyped was unfortunately a crucial skill. Again, this is arguably less important today (and arguably all written tests are bad for CS).
Later in college, I remember hating the assembly tests where you had to keep track of what numbers were in what address, and whether you were adding what was on the stack or in some register or the address or what was in the address and making a mistake in the very beginning could ruin the whole problem. Not fun, not sure how useful, but certainly gave you an appreciation of what was going on.