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.
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.
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.
Both of the above options are correct.
No support for type inheritance.
No support for operator overloading.
No support for method overloading.
No support for pointer arithmetic.
No support for generic programming.
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?
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.
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.
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.
Both of the above options are correct.
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?
0 is not a boolean type.
Q 15 - Which of the following is not a integer type in Go?
complex128 is not a integer type.
Q 16 - Which of the following is not a floating type in Go?
float128 is not a floating type.
Q 17 - Which of the following is a derived type in Go?
All of the above are derived types.
Q 18 - Which of the following is a derived type in Go?
All of the above are derived types.
Q 19 - Which of the following is a derived type in Go?
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.
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.
All of the above options are correct.
Q 22 - Which of the following operator gives remainder of after an integer division in Go?
% − Modulus Operator returns remainder of after an integer division.
Q 23 - Which of the following operator increases integer value by one in Go?
++ − Increments operator increases integer value by one.
Q 24 - Which of the following operator decreases integer value by one in Go?
-- − 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?
!= − Checks if the values of two operands are equal or not, if values are not equal then condition becomes true.
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 |