August 2021
Beginner
112 pages
1h 23m
English
| Puzzle 17 | An **Int**eresting String |
| | package main |
| | |
| | import ( |
| | "fmt" |
| | ) |
| | |
| | func main() { |
| | i := 169 |
| | s := string(i) |
| | fmt.Println(s) |
| | } |
Guess the Output | |
|---|---|
|
|
Try to guess what the output is before moving to the next page. |
This code will print: ©
The string type supports type conversion from int. It’ll treat this integer as a rune. The rune 169 is the copyright sign (©). People who make this mistake usually come from languages such ...
Read now
Unlock full access