Logo

Golang Questions Set 2:

Quiz Mode

Which of the following is a pointer in Go?

1
2
3
4

Solution:

Which of the following is NOT a valid control structure in Go?

1
2
3
4

Solution:

Which of the following is NOT a control structure in Go?

1
2
3
4

Solution:

Which keyword is used to indicate that a function does not return a value in Go?

1
2
3
4

Solution:

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

1
2
3
4

Solution:

Which of the following is NOT a valid way to declare a variable in Go?

1
2
3
4

Solution:

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

1
2
3
4

Solution:

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

1
2
3
4

Solution:

What is the difference between a pointer and a value in Go?

1
2
3
4

Solution:

What is the difference between a function and a method in Go?

1
2
3
4

Solution: