Which is a correct declaration?
- var int safe := 3
- var safe bool := 3
- safe := true CORRECT
Which is a correct declaration?
- var short := true
- int num := 1
- speed := 50 CORRECT
- num int := 2
Which is a correct declaration?
- x, y, z := 10, 20
- x = 10,
- y, x, p := 5, "hi", 1.5 CORRECT
- y, x = "hello", 10
Which declaration is equal to the following declaration?
- var s int = "hi"
- s := "hi" CORRECT
- s, p := 2, 3
Which declaration is equal to the following declaration?
- n := 10.0
- m, n := 1, 0
- var n int = 10 CORRECT
What's the type of the s
variable?
- bool
- string CORRECT
- int
- float64
What's the type of the b
variable?
- bool CORRECT
- string
- int
- float64
What's the type of the i
variable?
- bool
- string
- int CORRECT
- float64
What's the type of the f
variable?
- bool
- string
- int
- float64 CORRECT
What's the value of the x
variable?
What's the value of the x
variable?
Which of the following declaration can be used in the package scope?
- x := 10
- y, x := 10, 5
- var x, y = 5, 10 CORRECT