← Back to archive

Stdle #82 · comptime · 2026-08-27

What does this Zig snippet output?

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

const std = @import("std");
pub fn main() void {
const S = struct { a: i32, b: i32, c: i32 };
std.debug.print("{}\n", .{@hasField(S, "d")});
}
Comptime
4 attempts left

Answer & explanation