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 - Union types

B - Function types

C - Slice types

D - All of the above.

Answer : D

Explanation

All of the above are derived types.

Answer : A

Explanation

If you are using nested loops (i.e., one loop inside another loop), the break statement will stop the execution of the innermost loop and start executing the next line of code after the block.

Q 7 - Which of the following transfers control to the labeled statement in Go?

A - break

B - continue

C - goto

D - None of the above.

Answer : C

Explanation

goto transfers control to the labeled statement.

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 - In Go language, a function/variable is exported if its name starts with capital letter.

A - true

B - false

Answer : A

Explanation

A function/variable is exported if its name starts with capital letter.

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