Logo

Golang Questions Set 3:

Quiz Mode

Which operator is used to access fields in a struct in Go?

1
2
3
4

Solution:

Which of the following is a slice in Go?

1
2
3
4

Solution:

Which keyword is used to define a function in Go?

1
2
3
4

Solution:

Which data type is used to store whole numbers in Go?

1
2
3
4

Solution:

Which data type is used to store decimal numbers in Go?

1
2
3
4

Solution:

What is the value of x after the following code is executed: x := 5; x += 3; ?

1
2
3
4

Solution:

What is the output of the following code: fmt.Println("Hello, " + "world!")

1
2
3
4

Solution:

What is the syntax for declaring a variable in Go?

1
2
3
4

Solution:

Which of the following is a valid function signature in Go?

1
2
3
4

Solution:

What is the output of the following code: fmt.Println(true && false)

1
2
3
4

Solution: