← Back to archive

Stdle #9 · iteration · 2026-06-15

What does this C snippet output?

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

#include <stdio.h>
int main(void) {
int i = 0;
loop:
if (i < 4) {
printf("%d", i);
i++;
goto loop;
}
printf("\n");
return 0;
}
Iteration
4 attempts left

Answer & explanation