conventions.io

Tech Challenge

2026-09-25

🦀

Daily Tech Challenge

Rust

medium
Question 1 of 5

What does this program print, using u32::next_power_of_two and is_power_of_two?

Example
fn main() {
    let a = 20u32.next_power_of_two();
    let b = 32u32.next_power_of_two();
    let c = 0u32.next_power_of_two();
    println!("{} {} {} {}", a, b, c, 24u32.is_power_of_two());
}

Friday, September 25, 2026 · A new challenge drops every day