Loading...
QUIZ

Certification Test

 
Que No. 1 ) In Go, which operator is used to declare and initialize a new slice?

A.) :=
B.) =
C.) :
D.) ::


Que No. 2 ) What does the 'defer' keyword do in Go?

A.) Defines a function that runs when a program exits
B.) Defers the execution of a function until the surrounding function returns
C.) Delays the execution of a Goroutine
D.) Defers the declaration of a variable


Que No. 3 ) Which package is commonly used for handling HTTP requests and building web servers in Go?

A.) net/http
B.) http/server
C.) web/request
D.) http/util


Que No. 4 ) What is the purpose of the 'init' function in Go?

A.) To initialize variables with zero values
B.) To perform package-level initialization tasks
C.) To handle HTTP requests
D.) To declare and initialize global constants


Que No. 5 ) Which data structure in Go allows you to store key-value pairs and is similar to a dictionary in other languages?

A.) List
B.) Array
C.) Map
D.) Slice


Que No. 6 ) How do you create a new Goroutine in Go?

A.) goroutine myFunction()
B.) go myFunction()
C.) thread myFunction()
D.) create myFunction()


Que No. 7 ) What is the purpose of the 'make' function in Go?

A.) To create new Goroutines
B.) To allocate memory for slices, maps, and channels
C.) To declare new variables
D.) To start HTTP servers


Que No. 8 ) Which keyword is used to indicate that a variable's value cannot be changed once it's set?

A.) immutable
B.) final
C.) const
D.) readonly


Que No. 9 ) What is the Go equivalent of a 'for' loop in other programming languages?

A.) while
B.) for
C.) foreach
D.) repeat


Que No. 10 ) Which Go keyword is used to create custom data types?

A.) typedef
B.) struct
C.) type
D.) newtype