← Back to archive

Stdle #75 · enums · 2026-08-20

What does this Zig snippet output?

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

const std = @import("std");
const Dir = enum { north, south, east, west };
pub fn main() void {
const d = Dir.east;
std.debug.print("{s}\n", .{@tagName(d)});
}
Enums
4 attempts left

Answer & explanation