Wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Golang Basics

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

Go Created by

a)

Google

b)

Facebook

c)

Twitter

d)

None

2.

Operators Used In Golang

a)

...

b)

&&

c)

//

d)

*

3.

Not Used Variable can be ignored using

(a)  

4.

Is 'nil' an identifier in golang?

a)

not true

b)

not false

c)

not not true

d)

not not not not false

5.

const (

u = iota * 42

v float64 = iota * 42

w = iota * 42

) , wt is the value of v ?

(a)  

6.

How can the value of a pointer variable (var a *string) accessed ?

a)

a

b)

*a

c)

&a

d)

None

7.

Array & Slice Valid Difference ?

a)

A slice type has no specified length

b)

Arrays are passed by reference Where as Slice are passed by Value

c)

Arrays are collection of elements of the same type. A slice in Go is a convenient wrapper on top of array

d)

None are true

8.

Valid Literal Integer ?

a)

4_2

b)

4__2

c)

0x6

d)

.25

9.

Print the length of the String 's'. Write the full statement

(a)  

10.

Go is OpenSource

a)

true

b)

false

c)

maybe

d)

None