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 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 checks if the values of two operands are equal or not in Go?

A - !=

B - <>

C - eq

D - None of the above.

Answer : A

Explanation

!= − Checks if the values of two operands are equal or not, if values are not equal then condition becomes true.

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.

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 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.

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 - In Go language, Pointer types are derived types.

A - false

B - true

Answer : B

Explanation

Yes! Pointer types are derived types.

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