← Back to archive

Stdle #123 · integers · 2026-10-07

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 x: bool = true;
const y: bool = false;
std.debug.print("{d}\n", .{@intFromBool(x) + @intFromBool(y)});
}
Integers
4 attempts left

Answer & explanation