← Back to archive

Stdle #116 · option · 2026-09-30

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 a: ?u32 = null;
std.debug.print("{d}\n", .{(a orelse 5) * 2});
}
Option
4 attempts left

Answer & explanation