← Back to archive

Stdle #108 · control · 2026-09-22

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 {
var sum: u32 = 0;
for ("hello") |_| {
sum += 1;
}
std.debug.print("{d}\n", .{sum});
}
Control Flow
4 attempts left

Answer & explanation