← Back to archive

Stdle #131 · slices · 2026-10-15

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 hello: [:0]const u8 = "hello";
std.debug.print("{d}\n", .{hello.len});
}
Slices
4 attempts left

Answer & explanation