February 2022
Intermediate to advanced
140 pages
2h 28m
English
| Puzzle 8 | Walks Like a Duck, Quacks Like a Duck |
| | fn double_it(n: u64, _: i32) -> u64 { |
| | n * 2 |
| | } |
| | |
| | fn main() { |
| | let one: i32 = 1; |
| | let n = double_it(one as _, 3); |
| | println!("{}", n); |
| | } |
Guess the Output | |
|---|---|
|
|
Try to guess what the output is before moving to the next page. |
The program will display the following output, showing no warnings or errors:
| | 2 |
We find two surprises:
You can name a function parameter ...
Read now
Unlock full access