- 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.
Q 2 - Which of the following is true about packages in Go?
A - The first line of the program package defines the package name in which a Go program should lie.
B - It is a must statement as Go programs runs in packages.
Answer : D
Explanation
All of the above options are correct.
Q 3 - Which of the following operator checks if the values of two operands are equal or not in Go?
Answer : A
Explanation
!= − Checks if the values of two operands are equal or not, if values are not equal then condition becomes true.
Answer : A
Explanation
Yes! Method are special functions with a receiver.
Q 5 - Which of the following is true about global variables in Go?
A - Global variables are defined outside of a function, usually on top of the program.
B - The global variables will hold their value throughout the lifetime of your program.
C - A global variable is available for use throughout your entire program after its declaration.
Answer : D
Explanation
All of the above options are correct.
Q 6 - Which of the following function can be used to copy a slice to another slice in Go?
Answer : B
Explanation
Using copy() function, contents of a source slice are copied to destination slice.
Q 7 - Which of the following transfers control to the labeled statement in Go?
Answer : C
Explanation
goto transfers control to the labeled statement.
Answer : B
Explanation
No support for method overloading.
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.
Answer : B
Explanation
An lvalue may appear as either the left-hand or right-hand side of an assignment.
To Continue Learning Please Login
Login with Google