Skip to content
Breakpoint logobreakpoınt

C++ Quiz

Predict what each C++ program prints, or spot when it is undefined behaviour

C++ Quiz shows you a short C++ program and asks what it outputs according to the C++23 standard. Most programs compile and print something definite, and you type that output. Others fail to compile, rely on unspecified or implementation-defined behaviour, or may hit undefined behaviour, and you have to pick the right one of those instead.

Play on cppquiz.org

Free · No login · Browser · Advanced

Screenshot of C++ Quiz

About C++ Quiz

Each question has a difficulty rating and an explanation that points to the relevant part of the standard. It suits experienced C++ developers who want to test how well they know the language's corners, and anyone preparing for tricky interview questions. Your compiler will not always agree with the answer, which is part of the point.

It is free, runs in the browser and needs no account. There are 190 questions in the training pool, plus fixed quizzes you can share.

On Breakpoint since 10 Nov 2026.

Questions about C++ Quiz

What if I cannot work out an answer?

Each question has a hint you can open. After three more attempts, a link lets you give up and show the answer. The four choices are guaranteed output, compilation error, undefined behavior, or unspecified or implementation-defined behavior.

Can I keep a score and play with friends?

Training mode serves random questions. Starting a new quiz tracks a score and lets you invite friends. You can also clear your score. Each question shows a difficulty icon.

Made this game? Claim it →

Keyboard shortcuts

j / k
Move down / up the list (this page)
] / [
Next / previous page
o
Open the focused game
b
Save or unsave the focused game
/
Search (the home list, or the command palette elsewhere)
Ctrl K
Command palette: games, skills, pages (works even when single keys are off)
?
This help