← Back to archive

Stdle #128 · slices · 2026-10-12

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 = "abcdefgh";
std.debug.print("{s}\n", .{s[0..3]});
}
Slices
4 attempts left

Answer & explanation