Loading...
QUIZ

Certification Test

 
Que No. 1 ) What is a Goroutine leak in Go?

A.) A memory leak caused by Goroutines
B.) A situation where Goroutines are created but never terminated
C.) A network security vulnerability
D.) A type of runtime error


Que No. 2 ) In Go, which operator is used to receive data from a channel?

A.) <<
B.) >>
C.) <-
D.) ->


Que No. 3 ) What is the purpose of the 'new' keyword in Go?

A.) To create a new variable
B.) To allocate memory for a variable and return a pointer to it
C.) To declare a constant
D.) To initialize a slice


Que No. 4 ) What is the Go equivalent of an exception in other programming languages?

A.) Error
B.) Panic
C.) Exception
D.) Throw


Que No. 5 ) What is the purpose of the 'interface' type in Go?

A.) To define a class
B.) To specify a set of methods that a type must implement
C.) To declare a new data type
D.) To create a structure


Que No. 6 ) Which keyword is used to define a method for a struct in Go?

A.) method
B.) func
C.) struct
D.) define


Que No. 7 ) What is the purpose of the 'init' function in a Go package?

A.) To initialize variables with zero values
B.) To define custom data types
C.) To perform package-level initialization tasks
D.) To declare global constants


Que No. 8 ) In Go, what does the '...T' notation represent when defining a function parameter?

A.) It specifies a type T that can be used in a function
B.) It allows passing a variable number of arguments of type T
C.) It indicates a variadic function
D.) It represents an empty interface


Que No. 9 ) Which Go package is commonly used for unit testing?

A.) testing/unit
B.) unittest
C.) testing
D.) test


Que No. 10 ) What is the purpose of the 'sync' package in Go?

A.) To perform synchronization between Goroutines
B.) To manage HTTP requests
C.) To define custom data types
D.) To handle file operations