Which keyword is used to import packages in Go?
Which keyword is used to terminate a loop in Go?
Which keyword is used to define an interface in Go?
What is the correct syntax for a Go Lang if statement?
Which of the following is NOT a valid array declaration in Go?
What is the purpose of an interface in Go?
What will be the output of the following code snippet?
package main
import "fmt"
func main() {
arr := []int{1, 2, 3, 4, 5}
slice := arr[1:4]
slice[1] = 10
fmt.Println(arr)
}
Which of the following is NOT a valid way to implement an interface in Go?
Which of the following is true about the Go Lang switch statement?
What is the output of the following code?
package main
import "fmt"
func main() {
var ptr *int
fmt.Printf("Value of ptr: %x\n", ptr)
if ptr == nil {
fmt.Println("ptr is nil")
} else {
fmt.Println("ptr is not nil")
}
}