- 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 operator overloading.
Q 2 - Which of the following is not a integer type in Go?
Answer : C
Explanation
complex128 is not a integer type.
Q 3 - Which of the following is true about for loop statement in Go?
A - if condition is available, then for loop executes as long as condition is true.
B - if range is available, then for loop executes for each item in the range.
Answer : C
Explanation
Both of the above options are correct.
Q 4 - Which of the following is true about call by reference method of parameter passing in Go?
A - This method copies the address of an argument into the formal parameter.
B - Inside the function, the address is used to access the actual argument used in the call.
Answer : D
Explanation
All of the above options are correct.
Q 5 - Which of the following is the default value of a global variable in Go?
Answer : B
Explanation
Default value of a global variable is 0 type value or nil.
Q 6 - Which of the following is correct about slices in Go?
A - If a slice is declared with no inputs the by default, it is initialized as nil.
B - length of a nil slice is 0.
Answer : D
Explanation
All of the above options are correct.
Q 7 - Which of the following method of parameter passing, copies the actual value of an argument into the formal parameter of the function?
Answer : A
Explanation
Call by value − This method copies the actual value of an argument into the formal parameter of the function.
Q 8 - In which of the following method of parameter passing, changes made to the parameter inside the function have effect on the argument?
Answer : B
Explanation
Call by reference − changes made to the parameter inside the function have effect on the argument.
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.
Answer : A
Explanation
No! Slice types are derived types.