- 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
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Go Mock Test
This section presents you various set of Mock Tests related to Go. You can download these sample mock tests at your local machine and solve offline at your convenience. Every mock test is supplied with a mock test key to let you verify the final score and grade yourself.
Go Mock Test I
Q 1 - Which of the following is true about Go programming language?
A - Go is a general-purpose language designed with systems programming in mind.
B - It is strongly and statically typed, provides inbuilt support for garbage collection.
Answer : D
Explanation
All of the above options are correct.
Q 2 - 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.
Answer : B
Explanation
No support for type inheritance.
Answer : B
Explanation
No support for operator overloading.
Answer : B
Explanation
No support for method overloading.
Answer : B
Explanation
No support for pointer arithmetic.
Answer : B
Explanation
No support for generic programming.
Answer : A
Explanation
Yes! Go is a case sensitive programming language.
Q 9 - 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 10 - Which of the following is true about dynamic type declaration of a variable in Go?
B - Compiler don't need a variable to have type statically as a necessary requirement.
Answer : C
Explanation
Both of the above options are correct.
Q 11 - 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 12 - Which of the following is true about exporting methods in Go?
A - In Go language, a name is exported if it starts with capital letter.
Answer : C
Explanation
Both of the above options are correct.
Answer : A
Explanation
Yes! Variables of different types can be declared in one go using type inference.
Q 14 - Which of the following is not a boolean type in Go?
Answer : C
Explanation
0 is not a boolean type.
Q 15 - Which of the following is not a integer type in Go?
Answer : C
Explanation
complex128 is not a integer type.
Q 16 - Which of the following is not a floating type in Go?
Answer : A
Explanation
float128 is not a floating type.
Q 17 - Which of the following is a derived type in Go?
Answer : D
Explanation
All of the above are derived types.
Q 18 - Which of the following is a derived type in Go?
Answer : D
Explanation
All of the above are derived types.
Q 19 - Which of the following is a derived type in Go?
Answer : D
Explanation
All of the above are derived types.
Q 20 - 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 21 - Which of the following is correct about rvalue expression in Go?
A - The term rvalue refers to a data value that is stored at some address in memory.
Answer : D
Explanation
All of the above options are correct.
Q 22 - Which of the following operator gives remainder of after an integer division in Go?
Answer : B
Explanation
% − Modulus Operator returns remainder of after an integer division.
Q 23 - Which of the following operator increases integer value by one in Go?
Answer : A
Explanation
++ − Increments operator increases integer value by one.
Q 24 - Which of the following operator decreases integer value by one in Go?
Answer : C
Explanation
-- − Decrements operator decreases integer value by one.
Q 25 - 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 Sheet
Question Number | Answer Key |
---|---|
1 | D |
2 | C |
3 | B |
4 | B |
5 | B |
6 | B |
7 | B |
8 | A |
9 | C |
10 | C |
11 | D |
12 | C |
13 | A |
14 | C |
15 | C |
16 | A |
17 | D |
18 | D |
19 | D |
20 | D |
21 | D |
22 | B |
23 | A |
24 | C |
25 | A |