← Back to archive

Stdle #113 · numbers · 2026-09-27

What does this C++ snippet output?

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

#include <iostream>
int main() {
int n = 42;
std::cout << (bool)n + (bool)0 << "\n";
}
Numbers
4 attempts left

Answer & explanation