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 not a floating type in Go?

A - float128

B - complex64

C - complex128

D - All of the above.

Answer : A

Explanation

float128 is not a floating type.

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

A - ++

B - %

C - --

D - None of the above.

Answer : C

Explanation

-- − Decrements operator decreases 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 6 - Which of the following function can be used to increase the capacity of a slice in Go?

A - append()

B - copy()

C - resize()

D - None of the above.

Answer : A

Explanation

Slice allows increasing the capacity of a slice using append() function.

Answer : D

Explanation

All of the above options are correct.

Q 8 - In which of the following method of parameter passing, changes made to the parameter inside the function have effect on the argument?

A - call by value.

B - call by reference

C - Both of the above.

D - None of the above.

Answer : B

Explanation

Call by reference − changes made to the parameter inside the function have effect on the argument.

Q 9 - In Go language, a function/variable is exported if its name starts with capital letter.

A - true

B - false

Answer : A

Explanation

A function/variable is exported if its name starts with capital letter.

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

A - false

B - true

Answer : A

Explanation

No! Array types are derived types.

go_questions_answers.htm
Advertisements