← Back to archive

Stdle #144 · storage · 2026-10-28

What does this C snippet output?

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

#include <stdio.h>
void tick(void) {
static int n = 0;
n++;
printf("%d\n", n);
}
int main(void) {
tick();
tick();
tick();
return 0;
}
Storage
3 lines
4 attempts left

Answer & explanation