I found Question #1 to be bad, #2 is alright but coming close to just a 'trick' question. #5 is just a simple trick question, and I can see where people went wrong with it. Especially if they skimmed over the code, and in a high pressure test environment. The bonus question is reasonable and can be worked through, if it wasn't printing the string literals, which makes it just a mean trick question.
I think that's the problem with a lot of first time test (or interview) makers, they make their questions into trick/puzzle questions where they want the test taker to guess what the writer had in their mind.
--edited because I skimmed over the last question and assumed it was printing the values of the variables not the strings--
I think that's the problem with a lot of first time test (or interview) makers, they make their questions into trick/puzzle questions where they want the test taker to guess what the writer had in their mind.
--edited because I skimmed over the last question and assumed it was printing the values of the variables not the strings--