Look at this Go code. What will it print when run?
package main import "fmt" func main() { fmt.Println("Hello, Go!") }
Check the exact string inside the quotes and capitalization.
The program prints exactly what is inside the quotes with correct capitalization.
Choose the best description of what Go is mainly used for.
Think about what kind of programs Go is famous for.
Go is designed for building fast, reliable server and network programs.
What is the output of this Go program?
package main import "fmt" func main() { var x int = 5 var y int = 10 fmt.Println(x + y) }
Look at the variables and the operator used.
The program adds two integers and prints the sum.
What error will this Go code produce when compiled?
package main func main() { var a int = "hello" }
Check the type of the variable and the value assigned.
You cannot assign a string to an int variable in Go.
Choose the feature that Go has which is not common in many other programming languages.
Think about how Go handles multiple tasks at the same time.
Go has goroutines, lightweight threads, built into the language for easy concurrency.