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 method overloading?

A - yes

B - no

Answer : B

Explanation

No support for method overloading.

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 4 - Can a Go function return multiple values?

A - true

B - false

Answer : A

Explanation

A Go function can return multiple values.

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 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 8 - Go supports method overloading.

A - true

B - false

Answer : B

Explanation

No support for method overloading.

Q 9 - A static type variable declaration requires compiler to interpret the type of variable based on value passed to it.

A - true

B - false

Answer : B

Explanation

A dynamic type variable declaration requires compiler to interpret the type of variable based on value passed to it.

Q 10 - The term rvalue refers to a data value that is stored at some address in memory.

A - true

B - false

Answer : A

Explanation

The term rvalue refers to a data value that is stored at some address in memory.

go_questions_answers.htm
Advertisements