← Back to archive

Stdle #62 · defer · 2026-08-07

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 {
defer std.debug.print("1\n", .{});
defer std.debug.print("2\n", .{});
defer std.debug.print("3\n", .{});
}
Defer
3 lines
4 attempts left

Answer & explanation