Hi everyone,
thanks for your input, I really appreciate that.
Quote:
It would be nice to get a summary of the result on the final page, don't you think?
You are right, I will work on that tomorrow.
Quote:
Some of the questions are quite obscure (e.g. dealing with undefined behaviour that isn't entirely obvious to most people). I think there could be some more basic ones.
In fact, most questions/answers submitted by other people are what you'd call "basic", but the purpose of the quiz actually is to show people that they don't know much about C even if they think they do. I find it boring if quizzes start with questions that everyone will know after having read the first ten pages of a good book on C. There are already plenty of such quizzes out there.
Similar arguments hold for undefined behaviour: this is one of the most basic concepts the various C standards suggest. I keep getting angry seeing code that tries to fflush(stdin), let alone not checking return values of functions, e.g. malloc(). If the person taking the quiz is confused by the term "undefined behaviour" or its consequences, there's Google.
Quote:
And for fun, it would be nice to see what the percentage answers for each of the incorrect options where once the answer is given
That's a wonderful idea, haven't thought of it by now. Right now, the database only stores positives and fails, but I'll simply break the fails in two parts of roughly the same size and it will adjust itself in a few days. For some of the questions, the results sure will be fun to analyze.
Quote:
Also, quiz question 0x06a should probably rename the third answer to "undefined", since the current answer is sort of implying that the reader don't know the answer...
That's because the reader doesn't know the answer. "Undefined" is actually wrong, because if there are arguments and/or program name available from the host environment, the behaviour is absolutely well defined. A truly correct answer would be "Undefined if argument/name isn't available", but this seems too obvious.
Quote:
> If C is 1, what is C++?
Now the answer (2) is only true at the next sequence point.
I'm sure you have chosen the right answer anyway.
Of course your argument is true, but this question is just an opener, hopefully arousing interest in completing the quiz. When I started the quiz, I actually gave it 100 positive attempts to make sure it appears as the first question.
Quote:
> The "++"-Operator increments decimal values by one.
WTF has decimal got to do with it?
++ works on doubles, as well as pointers.
Further, saying c = 0x1234; doesn't suddenly break your ability to do c++ on it.
Right, but pointless. If you are pedantic, let me be pedantic too: 0x1234 is a decimal _value_ in a hexadecimal _representation_.
But it's ugly, so I corrected it. :-)
Quote:
"If it's missing, main() shall implicitly return 0 after completion."
This magical hack is only true of C++.
Read the explanation again. In the same sentence, it states that C99 doesn't require main() to return explicitly. For your reassurance, I modified the right answer to "Yes, since C99".
Quote:
Oh, and the whole "deref" and "question++" thing is way too geeky.
That's on purpose. No "geek" will be able to answer more than 5 questions correctly.
Except for this one, there's only one other page that links to my quiz; the majority (>90%, a shabby 1000 unique visitors per month) gets there by googling for "c programming quiz" and the like. I tell that because obviously, these persons show some specific interest in taking a C quiz. To me, this sounds pretty geeky. Of these people, only about 10% manage to get to the last question, so either the quiz is too easy (no), too hard (yes) or too boring (can't be). Conclusion: in my opinion there's nothing geeky whatsoever about the quiz itself. Having the buttons labeled in an ironical manner is my way of amusing the reader, if he isn't already by the surprisingly low percentage of people who were able to choose the right answer.
Salem, you sound a bit angry. Everything ok with you? If there are problems with the quiz, I'll correct them as soon as I can. The quiz is supposed to make you happy... :-)
Again, thanks for your quick responses. I hope there's more to come...
Greets,
Philip