...

/

Quiz: Deduce the Outputs

Quiz: Deduce the Outputs

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

We'll cover the following...

Choose one correct answer

1.

What is the output of the following code snippet?

a := [...]string{"a", "b", "c", "d"}

for i := range a {
	fmt.Println("Array item", i, "is", a[i])
}
A.

Array item 0 is a

Array item 1 is b

Array item 2 is c

B.

Array item 0 is a

Array item 1 is b

Array item 2 is c

Array item 3 is d

C.

Compiler error

D.

None of the above


1 / 12

We hope that you ...