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

A - yes

B - no

Answer : B

Explanation

No support for type inheritance.

Q 3 - Which of the following operator increases integer value by one in Go?

A - ++

B - %

C - --

D - None of the above.

Answer : A

Explanation

++ − Increments operator increases integer value by one.

Q 4 - Does Go supports function closures?

A - true

B - false

Answer : A

Explanation

Yes! function clousures are supported in Go. Functions closure are anonymous functions and can be used in dynamic programming.

Q 5 - Which of the following is the default value of a global variable in Go?

A - Undefined

B - 0 or nil

C - Not fixed

D - None of the above.

Answer : B

Explanation

Default value of a global variable is 0 type value or nil.

Q 6 - Which of the following function returns the total number of elements present in a slice?

A - size()

B - len()

C - cap()

D - None of the above.

Answer : B

Explanation

len() function returns the elements presents in the slice.

Q 8 - Go supports pointer arithmetics.

A - true

B - false

Answer : B

Explanation

No support for pointer arithmetic.

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 - Expressions that refer to a memory location is called "rvalue" expression.

A - false

B - true

Answer : A

Explanation

Expressions that refer to a memory location is called "lvalue" expression.

go_questions_answers.htm
Advertisements