← Back to archive

Stdle #17 · arrays · 2026-06-23

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 = [_]u8{ 1, 2 };
const b = a ** 3;
std.debug.print("{d}\n", .{b.len});
for (b) |v| {
std.debug.print("{d} ", .{v});
}
std.debug.print("\n", .{});
}
Arrays
2 lines
4 attempts left

Answer & explanation