← Back to archive

Stdle #170 · structs · 2026-11-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 t = .{ @as(i32, 1), @as(i32, 2), @as(i32, 3) };
std.debug.print("{d}\n", .{t[1]});
}
Structs
4 attempts left

Answer & explanation