Go course

VariablesQuiz: Variables

Go

Display

Theme

Variables · Quiz

Quiz: Variables

Test what you know about variables and data types in Go. Answer every question in the right-hand panel.

  1. Question 1 of 4What is the value of x after the following declaration?
    var x int
  2. Question 2 of 4Where can the := operator NOT be used?
  3. Question 3 of 4What happens when the following program is compiled?
    func main() {
    	nama := "Ani"
    }
  4. Question 4 of 4What is the type of the variable r?
    r := 2.5