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

A - yes

B - no

Answer : B

Explanation

No support for type inheritance.

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 : D

Explanation

All of the above options are correct.

Q 5 - Which of the following is the default value of a local variable in Go?

A - Undefined

B - 0 or nil

C - Not fixed

D - None of the above.

Answer : B

Explanation

Default value of a local variable is 0 type value or nil.

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 - Which of the following method of parameter passing, copies the address of an argument into the formal parameter?

A - call by value.

B - call by reference

C - Both of the above.

D - None of the above.

Answer : B

Explanation

Call by reference − This method copies the address of an argument into the formal parameter.

Q 9 - In Go language, Structure types are derived types.

A - false

B - true

Answer : B

Explanation

Yes! Structure types are derived types.

Q 10 - An lvalue may appear as either the left-hand or right-hand side of an assignment.

A - false

B - true

Answer : B

Explanation

An lvalue may appear as either the left-hand or right-hand side of an assignment.

go_questions_answers.htm
Advertisements