Waiting for validation
Consider the following Go code:
package main
import "fmt"
func main() {
var x interface{}
x = 10
y := x.(int)
fmt.Println(y)
x = "golang"
z := x.(int)
fmt.Println(z)
}
Author: W3D TeamStatus: Waiting for validationQuestion not yet passed
0
Community EvaluationsNo one has reviewed this question yet, be the first!
5
Write a Go program that prints 1 if test is true, and 0 otherwise.0
How to use goroutines in Go1
What is the equivalent of undefined in Go?0
Write a Go program that prints the string "Hello World" to the console.0
Write a Go program that prints the numbers from 1 to 100
Iterate over a slice in Go0
Write a Go program that prints the following lines to the console: line 1, line 2, line 3, line 4