← Back to archive

Stdle #121 · quirks · 2026-10-05

What does this C snippet output?

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

#include <stdio.h>
int main(void) {
int a = 3;
int b = (a > 2) ? 10 : (a = 100);
printf("a=%d b=%d\n", a, b);
return 0;
}
Quirks
4 attempts left

Answer & explanation