← Back to archive

Stdle #31 · defer · 2026-07-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 {
std.debug.print("A\n", .{});
defer std.debug.print("B\n", .{});
std.debug.print("C\n", .{});
}
Defer
3 lines
4 attempts left

Answer & explanation