← Back to archive

Stdle #17 · arrays · 2026-06-23

What does this C snippet output?

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

#include <stdio.h>
int main(void) {
int a[5] = {[2] = 9};
printf("%d %d %d\n", a[0], a[2], a[4]);
return 0;
}
Arrays
4 attempts left

Answer & explanation