← Back to archive

Stdle #68 · conversions · 2026-08-13

What does this C++ snippet output?

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

#include <iostream>
int main() {
float f = 0.1f;
double d = f;
std::cout << (d == 0.1) << "\n";
return 0;
}
Conversions
4 attempts left

Answer & explanation