← Back to archive

Stdle #72 · conversions · 2026-08-17

What does this C++ snippet output?

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

#include <iostream>
struct Cents {
int v;
Cents(int n) : v(n) {}
};
void show(Cents c) { std::cout << c.v << "\n"; }
int main() {
show(42);
return 0;
}
Conversions
4 attempts left

Answer & explanation