← Back to archive

Stdle #79 · storage · 2026-08-24

What does this C snippet output?

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

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

Answer & explanation