← Back to archive

Stdle #57 · slices · 2026-08-02

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 arr = [_]i32{ 10, 20, 30, 40, 50 };
const s = arr[2..];
std.debug.print("{d} {d}\n", .{ s.len, s[0] });
}
Slices
4 attempts left

Answer & explanation