Q.1 Which format specifier is used for string data type?
Ans : %s
Q.2 Which package has functions to read and Write files?
Ans : io/ioutil
Q.3 A Binary Tree has ______ branches.
D. exactly one
Ans : two
Q.4 Which sorting algorithm uses a pivot element and compares all other elements with the pivot?
A. Merge Sort
B. Quick Sort
C. Bubble Sort
D. Heap Sort
Ans : Quick Sort
Q.5 Linked- Lists are Sequential Data structure.
Ans : False
Q.6 The source code for a Go package should be inside a folder of the same name.
Ans : True
Q.7 Stack data structure follow which principle
A. LILO(Last In Last Out)
B. FCFS(First Come First Serve)
C. LIFO(Last In First Out)
D. FIFO(First In First Out)
Ans : LIFO(Last In First Out)
Q.8 Tree data structure is usually used to handle which type of data?
A. Binary data
B. Sequential data
C. Random data
D. Heirarchial data
Ans : Heirarchial data
Q.9 Which keyword is used to import packages in a Go program.
Ans : import
Q.10 Data structures are basically classified as ______ and ________ type.
Ans : Linear,Non-Linear
Q.11 Which packages are used for Reading and writing into Files?
A. os and io/ioutil
Ans : os and io/ioutil
Q.12 ______ is used to stop the execution of the program when an error occurs?
Ans : Panic
Q.13 Which keyword is used to convert functions into goroutines?
B. go func
Ans : go
Q.14 Which go command is used to format the go source code?
A. go format
B. go doc
C. go arrange
D. go fmt
Ans : go fmt
Q.15 Which go package is used to handle os signals?
Ans : os/signal
Q.16 What are the functions present in the errors package?
C. Throw() and Catch()
Ans : New()
Q.17 The ______ keyword is used to delay the function call in a program, it is similar to the final keyword in other languages.
Ans : defer
Q.18 Concurrency and parallelism are the same?
Ans : False
Q.19 Go programming has a try…catch block?
Ans : False
Q.20 The ______ function is used to recover from a panic condition in a Go program.
Ans : recover
Q.21 Channels can be of two types ______ and _____ ?
A. Unidirectional, bidirectional
D. complete, incomplete
Ans : Unidirectional, bidirectional
Q.22 ________ are a medium for communication between goroutines.
Ans : channels
Q.23 The Println() and Scanln() are a part of which package?
Ans : fmt
Q.24 Channels have a _______ associated with them.
A. port number
Ans : type
Q.25 wait group struct types are present in which package?
Ans : sync