Go Online Quiz



Following quiz provides Multiple Choice Questions (MCQs) related to Go. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.

Questions and Answers

Q 2 - Which of the following is a derived type in Go?

A - Union types

B - Function types

C - Slice types

D - All of the above.

Answer : D

Explanation

All of the above are derived types.

Q 5 - Can you define a pointer to pointer in Go?

A - true

B - false

Answer : A

Explanation

Yes! Go allows you to have pointer on a pointer and so on.

Q 6 - Which of the following function returns the capacity of slice as how many elements it can be accomodate?

A - size()

B - len()

C - cap()

D - None of the above.

Answer : C

Explanation

cap() function returns the capacity of slice as how many elements it can be accomodate.

Q 7 - Which of the following transfers control to the labeled statement in Go?

A - break

B - continue

C - goto

D - None of the above.

Answer : C

Explanation

goto transfers control to the labeled statement.

Q 8 - Go programming implementations use a traditional compile and link model to generate executable binaries.

A - false

B - true

Answer : B

Explanation

Go programming implementations use a traditional compile and link model to generate executable binaries.

Q 9 - In Go language, variables of different types can be declared in one statement.

A - true

B - false

Answer : A

Explanation

Yes! Variables of different types can be declared in one go using type inference.

Q 10 - The type for a case in select statement must be the a communication channel operation.

A - true

B - false

Answer : A

Explanation

The type for a case in select statement must be the a communication channel operation.

go_questions_answers.htm
Advertisements