← Back to archive

Stdle #91 · quirks · 2026-09-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 i;
int total = 0;
for (i = 0; i < 3; i++, total += i)
;
printf("i=%d total=%d\n", i, total);
return 0;
}
Quirks
4 attempts left

Answer & explanation