C++ Quiz

Continue quiz

About

C++ Quiz is written by Anders Schau Knatten with valuable input from Olve Maudal, Fernando Cacciola, other members of the ACCU, and several other contributers. If you discover any errors, or would like to contribute, please contact me at anders AT knatten.org, on Twitter, or on GitHub.

Help/FAQ

What is this?

This is a simple online quiz that you can use to test your knowledge of the C++ programming language.

How do I use it?

Most of the questions will compile and have deterministic output, for these you just need to enter the output of the program in the text box. Some programs do however have a compilation error, unspecified behaviour, or undefined behaviour. In that case, select the correct alternative from the dropdown, and leave the output empty.

Which version of the standard is assumed?

Unless otherwise specified, C++11.

I don't agree with an answer!

Contact me (see above) and I'll check it out.

How does scoring work?

If you are taking a fixed quiz (not just answering random questions in training mode), you get one point per correct answer. If you used a hint for that question, 0.5 is subtracted from your point. For each incorrect attempt you made at that question, the point is further divided by two. For instance, if you used one hint and three incorrect attempts, you get (1 - 0.5) / (2 * 2 * 2) = 0.0625 points. As you can see, it pays to think things through rather than guessing, and using a hint is often also better than guessing.

What features are planned?

See open issues at GitHub.

How can I help?

If you know C++, by adding more questions, or joining our mailing-list cppquiz-discuss@cppquiz.org. If you know Python/Django/JavaScript, by extending functionality. If you know web-design, by improving the design. Please contact me at anders AT knatten.org or Twitter.