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 type inheritance?

A - yes

B - no

Answer : B

Explanation

No support for type inheritance.

Q 2 - Which of the following is a derived type in Go?

A - Interface types

B - Map types

C - Channel types

D - All of the above.

Answer : D

Explanation

All of the above are derived types.

Q 4 - Method are special functions with a receiver in Go.

A - true

B - false

Answer : A

Explanation

Yes! Method are special functions with a receiver.

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.

Answer : C

Explanation

Both of the above options are correct.

Q 7 - Which of the following method of parameter passing, copies the actual value of an argument into the formal parameter of the function?

A - call by value.

B - call by reference

C - Both of the above.

D - None of the above.

Answer : A

Explanation

Call by value − This method copies the actual value of an argument into the formal parameter of the function.

Q 8 - Go supports method overloading.

A - true

B - false

Answer : B

Explanation

No support for method overloading.

Q 9 - Dynamic type variable declaration provides assurance to the compiler that there is one variable existing with the given type and name.

A - true

B - false

Answer : B

Explanation

Static type variable declaration provides assurance to the compiler that there is one variable existing with the given type and name.

Q 10 - You can have any number of case statements within a select statement in Go.

A - true

B - false

Answer : A

Explanation

You can have any number of case statements within a select statement in Go.

go_questions_answers.htm
Advertisements