← Back to archive

Stdle #139 · numbers · 2026-10-23

What does this C++ snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

#include <iostream>
int main() {
int flags = 0;
flags |= 1;
flags |= 4;
std::cout << flags << " " << ((flags & 4) != 0) << "\n";
}
Numbers
4 attempts left

Answer & explanation