February 2022
Intermediate to advanced
140 pages
2h 28m
English
| Puzzle 11 | Stacking Boxes |
| | fn main() { |
| | let c = Box::new([0u32; 10_000_000]); |
| | println!("{}", c.len()); |
| | } |
Guess the Output | |
|---|---|
|
|
Try to guess what the output is before moving to the next page. |
In debug mode, the program will crash with the message thread ’main’ has overflowed its stack. In release mode, the program will display the following output: 10000000.
10,000,000 32-bit integers requires 40Mb of memory ...
Read now
Unlock full access