← Back to archive

Stdle #178 · numbers · 2026-12-01

What does this C snippet output?

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

#include <stdio.h>
int main(void) {
const char *a = _Generic(1, int: "int", long: "long", default: "?");
const char *b = _Generic(1L, int: "int", long: "long", default: "?");
printf("%s %s\n", a, b);
return 0;
}
Numbers
4 attempts left

Answer & explanation