Following quiz provides Multiple Choice Questions (MCQs) related to Go. You will have to read all the given answers and click over the correct answer. If you are not sure about the answer then you can check the answer using Show Answer button. You can use Next Quiz button to check new set of questions in the quiz.
No support for generic programming.
Q 2 - Which of the following is true about exporting methods in Go?
A - In Go language, a name is exported if it starts with capital letter.
Both of the above options are correct.
Q 3 - Which of the following is true about expression switch statement in Go?
All of the above options are correct.
A Go function can return multiple values.
Q 5 - Which of the following is true about global variables in Go?
A - Global variables are defined outside of a function, usually on top of the program.
B - The global variables will hold their value throughout the lifetime of your program.
C - A global variable is available for use throughout your entire program after its declaration.
All of the above options are correct.
Q 6 - Which of the following function can be used to copy a slice to another slice in Go?
Using copy() function, contents of a source slice are copied to destination slice.
Q 7 - Which of the following method of parameter passing, copies the actual value of an argument into the formal parameter of the function?
Call by value − This method copies the actual value of an argument into the formal parameter of the function.
No support for pointer arithmetic.
Q 9 - The first line of the program package defines the package name in which a Go program should lie.
The first line of the program package defines the package name in which a Go program should lie.
No! Array types are derived types.