← Back to archive

Stdle #67 · control · 2026-08-12

What does this Zig snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

const std = @import("std");
fn power(base: u64, exp: u64) u64 {
if (exp == 0) return 1;
return base * power(base, exp - 1);
}
pub fn main() void {
std.debug.print("{d}\n", .{power(2, 10)});
}
Control Flow
4 attempts left

Answer & explanation