← Back to archive

Stdle #108 · storage · 2026-09-22

What does this C snippet output?

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

#include <stdio.h>
int total = 0;
void add(int n) { total += n; }
int main(void) {
add(4);
add(6);
add(10);
printf("%d\n", total);
return 0;
}
Storage
4 attempts left

Answer & explanation