- Go Tutorial
- Go - Home
- Go - Overview
- Go - Environment Setup
- Go - Program Structure
- Go - Basic Syntax
- Go - Data Types
- Go - Variables
- Go - Constants
- Go - Operators
- Go - Decision Making
- Go - Loops
- Go - Functions
- Go - Scope Rules
- Go - Strings
- Go - Arrays
- Go - Pointers
- Go - Structures
- Go - Slice
- Go - Range
- Go - Maps
- Go - Recursion
- Go - Type Casting
- Go - Interfaces
- Go - Error Handling
- Go Useful Resources
- Go - Questions and Answers
- Go - Quick Guide
- Go - Useful Resources
- Go - Discussion
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.
Q 1 - Which of the following is true about Go programming language?
A - Programs are constructed using packages, for efficient management of dependencies.
Answer : C
Explanation
Both of the above options are correct.
Answer : A
Explanation
Yes! Variables of different types can be declared in one go using type inference.
Q 3 - Which of the following is true about select statement in Go?
B - The type for a case must be the a communication channel operation.
Answer : D
Explanation
All of the above options are correct.
Q 4 - Which of the following is true about break statement in Go?
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 5 - Which of the following is true about local variables in Go?
A - Variables that are declared inside a function or block are called local variables.
B - They can be used only by statements that are inside that function or block of code.
C - Local variables are not known to functions outside their own.
Answer : D
Explanation
All of the above options are correct.
Q 6 - Which of the following is correct about maps in Go?
A - Given a key and a value, you can strore the value in a Map object.
B - After value is stored, you can retrieve it by using its key.
Answer : C
Explanation
Both of the above options are correct.
Q 7 - Which of the following is true about for loop in Go if for clause that is ( init; condition; increment ) is present?
Answer : D
Explanation
All of the above options are correct.
Answer : B
Explanation
No support for type inheritance.
Answer : B
Explanation
No support for generic programming.
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.
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.
To Continue Learning Please Login
Login with Google