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 - Is Go a case sensitive language?

A - yes

B - no

Answer : A

Explanation

Yes! Go is a case sensitive programming language.

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 3 - Which of the following operator gives remainder of after an integer division in Go?

A - ^

B - %

C - $

D - None of the above.

Answer : B

Explanation

% − Modulus Operator returns remainder of after an integer division.

Answer : C

Explanation

Both of the above options are correct.

Q 6 - Which of the following function returns the total number of elements present in a slice?

A - size()

B - len()

C - cap()

D - None of the above.

Answer : B

Explanation

len() function returns the elements presents in the slice.

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 - 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 - An rvalue is an expression that cannot have a value assigned to it which means an rvalue may appear on the right- but not left-hand side of an assignment.

A - true

B - false

Answer : A

Explanation

An rvalue is an expression that cannot have a value assigned to it which means an rvalue may appear on the right- but not left-hand side of an assignment.


go_questions_answers.htm

Advertisements