- 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 static type declaration of a variable in Go?
Answer : C
Explanation
Both of the above options are correct.
Q 2 - Which of the following is correct about lvalue expression in Go?
A - Expressions that refer to a memory location is called "lvalue" expression.
B - An lvalue may appear as either the left-hand or right-hand side of an assignment.
C - Variables are lvalues and so may appear on the left-hand side of an assignment.
Answer : D
Explanation
All of the above are derived types.
Q 3 - Which of the following is true about switch statement in Go?
Answer : C
Explanation
Both of the above options are correct.
Answer : A
Explanation
Functions can be created on the fly and can be used as values.
Answer : A
Explanation
Yes! Go allows you to have pointer on a pointer and so on.
Q 6 - Which of the following function returns the capacity of slice as how many elements it can be accomodate?
Answer : C
Explanation
cap() function returns the capacity of slice as how many elements it can be accomodate.
Q 7 - Which of the following causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating in Go?
Answer : B
Explanation
continue causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating.
Answer : B
Explanation
No support for type inheritance.
Answer : B
Explanation
Yes! Structure types are derived types.
Q 10 - Expressions that refer to a memory location is called "rvalue" expression.
Answer : A
Explanation
Expressions that refer to a memory location is called "lvalue" expression.
To Continue Learning Please Login
Login with Google