What will be the output of the following block of code?:
package main
import "fmt"
const (
_ = iota + 3
x
)
func main() {
fmt.Printf("%v\n", x)
}
Answer
Since the first iota is declared with the value 3 ( + 3), the next one has the value 4