Go Online Quiz


Advertisements

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 1 - Does Go support type inheritance?

A - yes

B - no

Answer : B

Explanation

No support for type inheritance.

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

A - Pointer types

B - Array types

C - Structure types

D - All of the above.

Answer : D

Explanation

All of the above are derived types.

Answer : C

Explanation

Both of the above options are correct.

Q 4 - Can a Go function be created on the fly and used as values?

A - true

B - false

Answer : A

Explanation

Functions can be created on the fly and can be used as values.

Answer : C

Explanation

Both of the above options are correct.

Q 6 - Which of the following function can be used to copy a slice to another slice in Go?

A - append()

B - copy()

C - resize()

D - None of the above.

Answer : B

Explanation

Using copy() function, contents of a source slice are copied to destination slice.

Q 7 - Which of the following causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating in Go?

A - break

B - continue

C - goto

D - None of the above.

Answer : B

Explanation

continue causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating.

Q 8 - Go supports method overloading.

A - true

B - false

Answer : B

Explanation

No support for method overloading.

Q 9 - Go supports generic programming.

A - true

B - false

Answer : B

Explanation

No support for generic programming.

Q 10 - In Go language, Slice types are inbuilt types.

A - false

B - true

Answer : A

Explanation

No! Slice types are derived types.

go_questions_answers.htm
Advertisements