Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Go Lang Techmaster

Total questions: 25

Worksheet time: 13mins

Name
Class
Date
1.

How to declare variables in GoLang ?

a)
b)
c)
d)
2.

How to import packages ?

a)
b)
c)
3.

Which code is valid ?

a)
b)
c)
4.

How to declare a function?

a)
b)
c)
d)
5.

Multiple results function. What will the program print ?

a)

"hello world"

b)

world hello

c)

hello world

6.

Named return values. What will the program print ?

a)

nil

b)

7 11

c)

10 7

d)

7 10

7.

What will this code print ?

(a)  

8.

What will these code print ?

(a)  

9.

What will the code print ?

a)

81 >= 20

10 4

b)

16 >= 10

81 >= 20

10 20

c)

256 >= 10

81 >= 20

10 20

d)

27 >= 20

9 20

10.

Switch. What will the code print?

a)

Go runs on window.

b)

Go runs on OS X.

c)

Go runs on Linux.

d)

There is no right answer

11.

Which is the valid code ?

a)
b)
c)

Both are wrong

12.

Stacking defers. What will the code print ?

(a)  

13.

Does Go support generic programming?

a)

Yes

b)

No

14.

Is Go a case sensitive language?

a)

Yes

b)

No

15.

What does "bin" directory contains?

a)

Source code of the project

b)

Executable commands

c)

Package object

16.

What is the pointer in Go ?

a)

Value of a variable

b)

Name of a variable

c)

Address of a variable

d)

Else

17.

Does Go support inheritance?

a)

Yes

b)

No

18.

Does Go support operator overloading ?

a)

Yes

b)

No

19.

What will be the output of this program ?

(a)  

20.

Is Go faster than Python ?

a)

Yes

b)

No

21.

How to create a struct ?

a)
b)
c)
22.

Array. Create an array called food with the length is 3 and the type is string.

(a)  

23.

What will the code print ?

(a)  

24.

Which one is a slice?

a)
b)
25.

How to create a slice ?

a)
b)
c)