Medium
What will be the output of the following program:
func main() {
fmt.Println("line 1")
defer fmt.Println("line 2")
defer fmt.Println("line 3")
fmt.Println("line 4")
}
Author: Communauté W3DStatus: PublishedQuestion passed 378 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
0
What is the type of the first character of a string in Go?5
Write a Go program that prints 1 if test is true, and 0 otherwise.1
What is the equivalent of undefined in Go?0
How to use goroutines in Go0
Iterate over a slice in Go0
Write a Go program that prints the numbers from 1 to 100
Write a Go program that prints the string "Hello World" to the console.