- 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 type inheritance.
Q 2 - Which of the following is a derived type in Go?
Answer : D
Explanation
All of the above are derived types.
Q 3 - Which of the following is true about type switch statement in Go?
A - The expression used in a switch statement must have an variable of interface{} type.
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 the default value of a local variable in Go?
Answer : B
Explanation
Default value of a local variable is 0 type value or nil.
Q 6 - Which of the following function can be used to increase the capacity of a slice in Go?
Answer : A
Explanation
Slice allows increasing the capacity of a slice using append() function.
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.
Answer : B
Explanation
No support for method overloading.
Answer : B
Explanation
Yes! Pointer types are derived types.
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.
To Continue Learning Please Login
Login with Google