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 generic programming?

A - yes

B - no

Answer : B

Explanation

No support for generic programming.

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 - 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 8 - Which of the following method is the default method of parameter passing in Go?

A - call by value.

B - call by reference

C - Both of the above.

D - None of the above.

Answer : A

Explanation

By default, Go uses call by value to pass arguments.

Q 9 - Package statement is a must statement as Go programs runs in packages.

A - true

B - false

Answer : A

Explanation

Package statement is a must statement as Go programs runs in packages.

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