← Back to archive

Stdle #40 · modern · 2026-07-16

What does this C++ snippet output?

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

#include <iostream>
int main() {
auto f = [](int x) { return x % 2 == 0; };
std::cout << f(4) << " " << f(7) << "\n";
}
Modern
4 attempts left

Answer & explanation