← Back to archive

Stdle #124 · comptime · 2026-10-08

What does this Zig snippet output?

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

const std = @import("std");
const Color = enum { red, green, blue };
pub fn main() void {
const c = Color.green;
std.debug.print("{s}\n", .{@tagName(c)});
}
Comptime
4 attempts left

Answer & explanation