- 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 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 IV
Q 1 - Go programming implementations use a traditional compile and link model to generate executable binaries.
Answer : B
Explanation
Go programming implementations use a traditional compile and link model to generate executable binaries.
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 8 - 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 9 - A static type variable declaration requires compiler to interpret the type of variable based on value passed to it.
Answer : B
Explanation
A dynamic type variable declaration requires compiler to interpret the type of variable based on value passed to it.
Q 10 - The first line of the program package defines the package name in which a Go program should lie.
Answer : A
Explanation
The first line of the program package defines the package name in which a Go program should lie.
Answer : A
Explanation
Package statement is a must statement as Go programs runs in packages.
Q 12 - In Go language, a function/variable is exported if its name starts with capital letter.
Answer : A
Explanation
A function/variable is exported if its name starts with capital letter.
Q 13 - In Go language, variables of different types can be declared in one statement.
Answer : A
Explanation
Yes! Variables of different types can be declared in one go using type inference.
Answer : B
Explanation
Yes! Pointer types are derived types.
Answer : B
Explanation
Yes! Structure types are derived types.
Answer : A
Explanation
No! Array types are derived types.
Answer : A
Explanation
No! Slice types are derived types.
Q 18 - 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.
Q 19 - An lvalue may appear as either the left-hand or right-hand side of an assignment.
Answer : B
Explanation
An lvalue may appear as either the left-hand or right-hand side of an assignment.
Q 20 - Variables are rvalues and so may appear on the left-hand side of an assignment.
Answer : A
Explanation
Variables are lvalues and so may appear on the left-hand side of an assignment.
Q 21 - 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.
Q 22 - An rvalue is an expression that cannot have a value assigned to it which means an rvalue may appear on the right- but not left-hand side of an assignment.
Answer : A
Explanation
An rvalue is an expression that cannot have a value assigned to it which means an rvalue may appear on the right- but not left-hand side of an assignment.
Q 23 - Numeric literals are lvalues and so may not be assigned and can not appear on the left-hand side.
Answer : B
Explanation
Numeric literals are rvalues and so may not be assigned and can not appear on the left-hand side.
Q 24 - You can have any number of case statements within a select statement in Go.
Answer : A
Explanation
You can have any number of case statements within a select statement in Go.
Q 25 - The type for a case in select statement must be the a communication channel operation.
Answer : A
Explanation
The type for a case in select statement must be the a communication channel operation.
Answer Sheet
Question Number | Answer Key |
---|---|
1 | B |
2 | B |
3 | B |
4 | B |
5 | B |
6 | B |
7 | A |
8 | B |
9 | B |
10 | A |
11 | A |
12 | A |
13 | A |
14 | B |
15 | B |
16 | A |
17 | A |
18 | A |
19 | B |
20 | A |
21 | A |
22 | A |
23 | B |
24 | A |
25 | A |