← Back to archive

Stdle #165 · iteration · 2026-11-18

What does this C snippet output?

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

#include <stdio.h>
int main(void) {
int n = 7;
if (n > 0)
if (n % 2 == 0)
printf("even+\n");
else
printf("odd+\n");
else
printf("neg\n");
return 0;
}
Iteration
4 attempts left

Answer & explanation