- 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.
Answer : B
Explanation
No support for method overloading.
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 decreases integer value by one in Go?
Answer : C
Explanation
-- − Decrements operator decreases integer value by one.
Answer : A
Explanation
A Go function can return multiple values.
Q 5 - Which of the following is correct about slice in Go?
A - Go Slice is an abstraction over Go Array.
B - It provides many utility functions required on Array and is widely used in Go programming.
Answer : D
Explanation
All of the above options are correct.
Q 6 - Which of the following is correct about maps in Go?
A - delete() function is used to delete an entry from the map.
B - delete() function requires map and corresponding key which is to be deleted.
Answer : C
Explanation
Both of the above options are correct.
Q 7 - Which of the following is correct about type casting in Go?
A - Type casting is a way to convert a variable from one data type to another data type.
B - if you want to store a long value into a simple integer then you can type cast long to int.
Answer : C
Explanation
Both of the above options are correct.
Q 8 - Which of the following method of parameter passing, copies the address of an argument into the formal parameter?
Answer : B
Explanation
Call by reference − This method copies the address of an argument into the formal parameter.
Q 9 - Dynamic type variable declaration provides assurance to the compiler that there is one variable existing with the given type and name.
Answer : B
Explanation
Static type variable declaration provides assurance to the compiler that there is one variable existing with the given type and name.
Q 10 - The term rvalue refers to a data value that is stored at some address in memory.
Answer : A
Explanation
The term rvalue refers to a data value that is stored at some address in memory.