Quiz: Deduce the Outputs

In this lesson, your concepts will be evaluated through a quiz.

Choose one correct answer

1

Deduce the output of the following program.

package main
var a = "G"
func main() {
   n()

   m()
   n()
}
func n() { print(a) }
func m() {
  a := "O"
  print(a)
}
A)

OGO

B)

GOG

C)

GOO

D)

OGG

Question 1 of 30 attempted

Get hands-on with 1400+ tech skills courses.