← Back to archive

Stdle #92 · iteration · 2026-09-06

What does this C snippet output?

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

#include <stdio.h>
int main(void) {
int tries = 0;
int target = 3;
do {
tries++;
} while (tries != target);
printf("tries=%d\n", tries);
return 0;
}
Iteration
4 attempts left

Answer & explanation