← Back to archive

Stdle #55 · comparisons · 2026-07-31

What does this C snippet output?

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

#include <stdio.h>
int main(void) {
int cond = 0;
double r = cond ? 1 : 2.5;
printf("%g\n", r);
return 0;
}
Comparisons
4 attempts left

Answer & explanation