WorksheetsGo Lang Techmaster
Total questions: 25
Worksheet time: 13mins
How to declare variables in GoLang ?
How to import packages ?
Which code is valid ?
How to declare a function?
Multiple results function. What will the program print ?
"hello world"
world hello
hello world
Named return values. What will the program print ?
nil
7 11
10 7
7 10
What will this code print ?
(a)
What will these code print ?
(a)
What will the code print ?
81 >= 20
10 4
16 >= 10
81 >= 20
10 20
256 >= 10
81 >= 20
10 20
27 >= 20
9 20
Switch. What will the code print?
Go runs on window.
Go runs on OS X.
Go runs on Linux.
There is no right answer
Which is the valid code ?
Both are wrong
Stacking defers. What will the code print ?
(a)
Does Go support generic programming?
Yes
No
Is Go a case sensitive language?
Yes
No
What does "bin" directory contains?
Source code of the project
Executable commands
Package object
What is the pointer in Go ?
Value of a variable
Name of a variable
Address of a variable
Else
Does Go support inheritance?
Yes
No
Does Go support operator overloading ?
Yes
No
What will be the output of this program ?
(a)
Is Go faster than Python ?
Yes
No
How to create a struct ?
Array. Create an array called food with the length is 3 and the type is string.
(a)
What will the code print ?
(a)
Which one is a slice?
How to create a slice ?
