← Back to archive

Stdle #120 · iteration · 2026-10-04

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;
while (i < 5) {
i++;
if (i == 2) goto skip;
printf("%d ", i);
skip:;
}
printf("\n");
return 0;
}
Iteration
4 attempts left

Answer & explanation